View Full Version : how do i go from one form to another with the same record number displaying?


cjl
12-06-1999, 05:58 AM
I am working on a database which i have divided into 5 forms. I have added command buttons to go from one form to another, but how do i get from the 3rd record (for example) on 1 form to the 3rd record on the next?

alexmb1
07-01-2009, 12:53 AM
you have to create a 'where' clause that specifies which record in the form you are viewing, for instance form 1, you want to match in the for you are going to open, for instance for 3.

you could do and onClick event that looks like that

Do.Cmd.OpenForm "form_name", acNormal, , "[field_name] = '" & Me("field_in_current_form") & "'"

form_name = the name of the form you would like to open i.e. number 3
field_name = the name of the field in the form you would like to open based on a match in a current form i.e. a field in form 3 that you would like to match in form 1
field_in_current_form = the field in the current form i.e form 1 that you would like to match in form 3

hope this helps