Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Posts
    14

    Unanswered: Help with textbox and fso object and displaying date created

    I have a question which I have had some help with but am still missing something. I am not a master at VB. On my form, a generic image viewer, I input an account number (textbox). Then hit a search button I have set up and the first image in the set displays. From there I can hit Next and Previous (both command buttons) to display any photos in that folder with the same base account number. As an example, an account number (RPC) of 11111 will have a file number of 0011111_01_01.jpg for the picture. I want to add a textbox called datestamp that will display the .datecreated. I want it to display when the pictures load/changes, so would it go in the After Update field for the new text box or should the code be in the On Click event of the Search, Next and Previous buttons leading to that new text box? Here is my code to load the initial picture... Again, I'm not a coding guru so specifics on scripting is appreciated. Thanks, hope I am not being confusing.

    pNum = 1
    dNum = 1
    Me.RPC.SetFocus
    Rec = Me.RPC.Text

    pth = "r:\" & "P0" & Left(Rec, 2) & "\"
    pFile = "00" & Rec & "_0" & dNum & "_0" & pNum & ".jpg"
    strFile = Dir(pth & pFile)

    If strFile <> "" Then

    Me.Ph.Picture = pth & pFile
    Me.PicNum.SetFocus
    Me.PicNum.Text = pNum
    End If

    If IsNull(Me.PicNum) Then
    MsgBox "No pictures present for that RPC."
    End If

  2. #2
    Join Date
    Apr 2011
    Posts
    14

    I got it

    I got it. Thanks guys.

Posting Permissions

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