Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2007
    Posts
    6

    Question Real time database question


    I have created a database that tracks work orders in real time (whereas command buttons were created and when clicked displayed the current date/time), but I have a problem I've been unable to solve, and I'll try to provide as many details as I can (and I have attached the form view [doc6] and the form in design view [doc7]for reference: when I press the ‘call received’ command button, nothing appeared in the date field, but when I scrolled back then forward, the date appeared. Is there any reason for this happening? If you could leave a detailed answer, I'd greatly appreciate it; I am not super tech literate, so the answer in its simplest form is greatly appreciated.

    Thanks again to whomever can help me
    Joe

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What code or macro do you have behind the call received button?

  3. #3
    Join Date
    Dec 2007
    Posts
    6
    Quote Originally Posted by RuralGuy View Post
    What code or macro do you have behind the call received button?
    The macro I have is the following:

    Action: SetValue

    Item: [DATEREQUESTED]
    Expression: Date ()

    Not sure if that helps any.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I was afraid you were going to be using a macro. Not my strong suit! Change the name of the control that is bound to the [DATEREQUESTED] field to something like txtDateRequested and then modify the macro so that you are setting the Control to Date() and not the field directly.

  5. #5
    Join Date
    Dec 2007
    Posts
    6
    Quote Originally Posted by RuralGuy View Post
    I was afraid you were going to be using a macro. Not my strong suit! Change the name of the control that is bound to the [DATEREQUESTED] field to something like txtDateRequested and then modify the macro so that you are setting the Control to Date() and not the field directly.
    Now when you say the "name of the control", do you mean the NAME part or the CONTROL SOURCE?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you renamed the control to txtDateRequested as suggested then your macro will SetValue of txtDateRequested and not [DATEREQUESTED].

  7. #7
    Join Date
    Dec 2007
    Posts
    6
    Quote Originally Posted by RuralGuy View Post
    If you renamed the control to txtDateRequested as suggested then your macro will SetValue of txtDateRequested and not [DATEREQUESTED].
    Nice, it worked...now I'm having the same problem with the Completion Date command button (End Date field); I had it working before, that's the weird part.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The default name for a control is the name of the field to which it is bound. Unfortunately, when you use the name, Access does not know if you mean the control or the field, since it can get to either. As a result, I usually rename the controls in some form of naming convention.

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

Similar Threads

  1. PTO Time Management Database
    By Stanggirlie in forum Programming
    Replies: 1
    Last Post: 03-27-2009, 09:33 AM
  2. Update a combo box in real time
    By protean_being in forum Forms
    Replies: 0
    Last Post: 05-17-2008, 07:39 AM
  3. New to forum...database question
    By denileigh in forum Access
    Replies: 2
    Last Post: 07-03-2006, 02:00 PM
  4. Replies: 1
    Last Post: 12-09-2005, 09:16 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