Going to a specific record on a form

G

Guest

Hello,

I have a menu with a combo box that will open a form with the chosen record
(so the form is based on a filtered query).

I also have another function on the menu that I want to allow me to go to
the last record on the same form.

How can I go about using the combo box to open a specified record without
the form being based on a filtered query?


thanks




--
http://www.patriotsquestion911.com
http://www.911truth.org
http://www.wtc7.net
http://www.st911.org
http://www.journalof911studies.com
http://www.pilotsfor911truth.org
http://ae911truth.org
 
G

Guest

thanks for the reply but I don't think it is quite what I am looking for.

The combo box is on the menu and I want to use it to go to a record on a
different form that hasn't been opened yet (I am using the after update event
in the combo box to open the form).

Hoping that makes sense.
 
R

Rick Brandt

scubadiver said:
thanks for the reply but I don't think it is quite what I am looking
for.

The combo box is on the menu and I want to use it to go to a record
on a different form that hasn't been opened yet (I am using the after
update event in the combo box to open the form).

Hoping that makes sense.

The command button wizard has an option for opening a form showing records
related to the record on the current form. All you need to do is take that code
and use it in the AfterUpdate event of your ComboBox. Essentially you use the
OpenForm method a supply a WHERE argument that pre-filters the form being
opened.

DoCmd.OpenForm "FormName",,,"SomeField = '" & Me.ComboBoxName & "'"

If your ComboBox value is numeric eliminate the single quotes.
 
G

Guest

thanks.



Rick Brandt said:
The command button wizard has an option for opening a form showing records
related to the record on the current form. All you need to do is take that code
and use it in the AfterUpdate event of your ComboBox. Essentially you use the
OpenForm method a supply a WHERE argument that pre-filters the form being
opened.

DoCmd.OpenForm "FormName",,,"SomeField = '" & Me.ComboBoxName & "'"

If your ComboBox value is numeric eliminate the single quotes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top