Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2011
    Location
    USA
    Posts
    13

    Exclamation Unanswered: Making a event procedure to open form and search for record, search box problems

    I have made a VB seach box for a form that I am working on to search the last name when I click the Button:

    Private Sub Command3_Click()

    DoCmd.OpenForm "Owner data Screen", acNormal, , "LNAME = " & LNAME

    End Sub

    The problem is that I get when my parameter box comes up is that the It shows the Name of the first person listed instead of "Enter Last Name" like I want it to say. If you could help me out you are awesome.

    I am using Access 2007 Event procedure to write this, If it is better to set up a macro I would if I could get some direction on that. I just figured it would be better to write the code.
    Attached Thumbnails Attached Thumbnails Dialog Box Problem.png  
    Last edited by GallantDon; 10-05-11 at 08:28. Reason: user information

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    probably best to ask this in the MS Access forum, instead of the VB forum. although closely related the visual basic in MS Office products VBA (Visual Basic for Applications) is not the same as Visual Basic or Visual Basic.NET
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Oct 2011
    Location
    USA
    Posts
    13
    Thank you, I am brand new to using a forum so thanks for the heads up.

  4. #4
    Join Date
    Oct 2011
    Location
    USA
    Posts
    13
    Quote Originally Posted by healdem View Post
    probably best to ask this in the MS Access forum, instead of the VB forum. although closely related the visual basic in MS Office products VBA (Visual Basic for Applications) is not the same as Visual Basic or Visual Basic.NET
    Isn't this the MS Access Forum though? My track shows:

    dBforums > PC based Database Applications > Microsoft Access > Making a event procedure to open form and search for record, search box problems

    Is there a different track to get to MS Access?

Posting Permissions

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