Results 1 to 5 of 5
  1. #1
    crombiecrunch is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    15

    auto populate text field with info help needed

    Hello All



    I have a text field that I would like to have some information automatically populated when the form is open. I know the basics but the trouble I am having is having the date and time populated before the default text.

    here is what I tried but no luck on it

    Code:
    Private Sub Form_Load()
    Dim strQuery As String
    'Dim js As Integer
    Dim currDateTime As Date
    currDateTime = Now()
    Me.Description = " & currDateTime & " & " " & "J.Adams 41066 CLT SMB - AM : " & " " & ""
    End Sub

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Me.Description = currDateTime & "J.Adams 41066 CLT SMB - AM : "

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Is this a bound form? If so, then should move to new record row first, otherwise will change data of existing record. Or is this form DataEntry property set to Yes?

    Too many quote marks and concatenation.

    = currDateTime & " J.Adams 41066 CLT SMB - AM : "

    Why do you want to save this calculated value? It can be generated when needed - no need to save.

    Not sure what you mean be "before the default text".

    What does 'no luck' mean - what happens?
    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.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What happens when you use the following?
    Me.Description = "J.Adams 41066 CLT SMB - AM : "

  5. #5
    crombiecrunch is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    15
    Quote Originally Posted by NTC View Post
    Me.Description = currDateTime & "J.Adams 41066 CLT SMB - AM : "
    Ugh, I swear I thought I tried this one. Thank you its working as needed now.

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

Similar Threads

  1. Replies: 7
    Last Post: 03-02-2014, 03:16 PM
  2. Help For Text Box Auto Populate Fileds
    By pagi33 in forum Forms
    Replies: 1
    Last Post: 01-06-2014, 10:12 AM
  3. Replies: 4
    Last Post: 08-20-2013, 08:46 AM
  4. Auto populate text from date
    By losingmymind in forum Access
    Replies: 4
    Last Post: 05-30-2013, 10:39 AM
  5. Replies: 1
    Last Post: 11-16-2012, 02:56 AM

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