Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2004
    Posts
    660

    Unanswered: Intermittent date problems on user PC when running report (was "Strange problem")

    I have a problem occured a couple of time. I have a comission report. There are issue date and expiration date on it. When enter a date it will create a bouch of report with data on it. But sometime it showed wrong date. And I didn't have this experience. When the user give me the wrong comission. I check the database, it has correct date on it. But i don't now why it print wrong date, if it is wrong, the whole reports could be wrong. But only some record has this problem. And i check the back up data, it is completely right. I don't know what is the problem. If i have this proble in my PC. i could find out the problem. But it didn't happen in my PC. But my supervison let me figure out the problem to see if the user problem. It is difficuty to figure out if i have no problem. Anybody, please help. Thanks in advance.

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Sometimes a missing Refresh command somewhere can be the culprit. For example, someone enters a date in a date field and instead of tabbing off the field, somehow immediately executes opening the report and for some odd reason, the date didn't set in the table and open the report at the same time. If you have any buttons which when clicked open a report, try adding in a refresh command before the commands to actually open the report. Issueing a Refresh command is a good way for MSAccess to say "Wait, before I do anything else, I'm going to save all data entered on this form."
    Last edited by pkstormy; 01-03-08 at 22:55.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    you might also want to check the user's date-formats in Windows Regional Settings - if different from yours, ask them to temporarily set the same date format as yours and see if the problem goes away.
    if Regional Settings was the problem, the real fix is to rewrite the application 'defensively' so that it handles any user preferences for dates (and decimal character and thousands-separator character).

    there are additional problems with some non-English Windows versions (e.g. Korean Windows): if running on non-English Windows, provide more info.

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Mar 2004
    Posts
    660
    actually only one user enter the dates. The wrong date is 12/28/2007. But it print 1/9/2004. I don't know Refresh command. Could you please talk about how to use it and where use it? Many thanks.

  5. #5
    Join Date
    Mar 2004
    Posts
    660
    I forgot to mention, the report ask to enter the date (e.g. 12/28/2007). It will suppose print all the date with 12/28/2007. But the user said one of the commission print with 1/9/2004. I have no idea where it happen. I tried in my computer, there is no way to get this one. Actually this wrong commission was found a couple dates later after they printed the report. Thanks again!

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Go to the query that prompts you to enter the date and open it in SQL view -> copy and paste the SQL back here
    George
    Home | Blog

  7. #7
    Join Date
    Mar 2004
    Posts
    660
    Please see the following:

    SELECT Commision.NEWRENLATE, Commision.DATE_REC, Commision.ISSUE, Commision.FNAME, Commision.LNAME, Commision.[COUNTY NAME], Commision.EXP_DATE, Commision.ADDRESS1, Commision.CITY, Commision.STATE, Commision.ZIP, Commision.HPHONE, Commision.WPHONE
    FROM Commision
    WHERE (((Commision.NEWRENLATE)="N") AND ((Commision.ISSUE) Between [Enter 1st date] And [Enter last date]))
    ORDER BY Commision.[COUNTY NAME];

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    After re-reading some of the further posts, I'm not totally sure your problem stems from a refresh problem. If the report asks you to enter the date range, it means there is criteria in the query for the report or on the report which may take refreshing a form's data out of the question. The refresh command would be used if you were entering data on the form, clicked a button to open the report, and there is a field on the report which is based off of data entered on the form which doesn't seem to be transcribing correctly to the report or the data set doesn't seem to be correctly returned. As georgev suggested, if you can copy your sql statement to a post, it might help to diagnose your problem. As izyrider suggested, it could also be a problem with the regional date settings on the machine.
    Last edited by pkstormy; 01-04-08 at 12:10.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    After looking at your sql statement, is the ISSUE data correct then in the table? If it is, does it correctly show up on the report if the report is opened a second time? If you open the same report a second time using the same criteria and the data is correct the 2nd time the report is opened where it's not correct the first time the report is opened, this is sometimes a symptom of a refresh (or requery) problem on the data after it is entered on a form. Otherwise, there is something else going on. I may be off-base here with the refresh solution. I'm assuming that your report is correct when opened a 2nd time but not correct when opened the 1st time (ie. the same user opens the report a 2nd time and it is ok.) and is associated with new data entered/updated. Again, I may have misread your problem. To issue a refresh, simply enter a Refresh command in the line before your report opens. It's used when new data is entered/updated on a form and a report is opened without "refreshing" or requerying the data and the return of the data on the report doesn't reflect the data entered/updated on the form. I'm thinking though this is not the problem and I've misread your post.
    Last edited by pkstormy; 01-04-08 at 12:17.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  10. #10
    Join Date
    Mar 2004
    Posts
    660
    Thanks all. I plan to create a report using the same query that the commision uses. Then let them check the report before printing the commision. Hopeful i can see the error. As i didn't see this kind of error. Only user told me this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •