Results 1 to 2 of 2
  1. #1
    rbpd5015 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    2

    Open form to current record

    I have a form in which I have a vehicle section. (Tag, vin, color, make, model). (Called Vehicle form)



    I then have a second form which has a drop down of where I select the vehicle based on its vehid (PD5005, PD4002...etc). That form is called Vehicleinfo.

    Want I want is a button that when I click it takes me to the make vehicle form listed at top and to the currently selected record.

    So if I am on PD870 I want to be able to click the edit vehicle button and jump to the current record of PD870.

    I set up the button using the wizrd but it prompts me to enter the vehicle number. I do not want that.

    Below is my where condition I got in the query of the button.

    "[VehNum]=" & "'" & [IDVeh] & "'"

    What would that need to say.

    Matt

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Nearly right

    Code:
    "[VehNum]='" & Me.IDVeh & "'"
    Or you can do it another way.

    On the OnLoad event of the vehicle info form you can enter

    Code:
     
    Me.Filter = "[VehNum]='" & Forms("Vehicle")("IDVeh") & "'"
    Me.FilterOn = True
    Make sure you are using the correct field names, if they are different from the above example.

    David

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

Similar Threads

  1. Replies: 4
    Last Post: 07-22-2009, 02:33 PM
  2. Replies: 1
    Last Post: 05-16-2009, 08:47 AM
  3. Replies: 4
    Last Post: 03-24-2009, 09:07 PM
  4. Replies: 0
    Last Post: 10-16-2008, 02:39 PM
  5. Replies: 3
    Last Post: 02-13-2008, 09:55 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