Results 1 to 3 of 3
  1. #1
    zugapy is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    5

    Problem about buddhist era data

    This is my data form;input buddhist era data
    Click image for larger version. 

Name:	2014-03-17_131655.png 
Views:	7 
Size:	34.7 KB 
ID:	15776
    When press "Add to history button"


    by command:
    sql = "INSERT INTO [History] (AssetID, AssetCategoryID, EmployeeID, DateBorrowed,

    DateReturned) " _
    & "VALUES (" & Me.AssetID.Value & ", " & Me.AssetCategoryID.Value & ", " &


    Me.EmployeeID.Value & ", #" & DateValue(Me.DateBorrowed) & "#, #" & DateValue


    (DateReturned) & "#)"

    A result is
    Click image for larger version. 

Name:	2014-03-17_131515.png 
Views:	6 
Size:	4.8 KB 
ID:	15777

    The result at above is not correct(3100) because it should be 2557.

    Anyone,help me please.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Are those date values going into text fields? Why using DateValue function? If those are text fields then don't try to save date values. Just save the text string.

    & ", '" & Me.DateBorrowed & "', '" & DateReturned & "')"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    zugapy is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    5
    Quote Originally Posted by June7 View Post
    Are those date values going into text fields? Why using DateValue function? If those are text fields then don't try to save date values. Just save the text string.

    & ", '" & Me.DateBorrowed & "', '" & DateReturned & "')"
    Thank you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Scrub Data Problem Please Help
    By aqiang in forum Access
    Replies: 1
    Last Post: 11-15-2012, 06:12 PM
  2. Replies: 2
    Last Post: 10-31-2012, 11:52 AM
  3. Problem getting the data I need!
    By mseeker22 in forum Queries
    Replies: 5
    Last Post: 01-26-2012, 12:11 PM
  4. problem with data
    By erminm in forum Queries
    Replies: 3
    Last Post: 01-24-2012, 01:42 PM
  5. Data Entry Problem
    By ZMac in forum Access
    Replies: 3
    Last Post: 06-15-2011, 08:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums