Navigation on a form

M

Mommio2

Hello! I have a menu form on which you can either choose to add or edit a
record. If you choose edit, you pick the one you want from a combobox.
This is done via a macro.

Action = OpenForm
View = Form
Where Condition = [Forms]![Menu]![Edit_Student]=[Students]![Student_ Last_
Name]
Data Mode = Edit
Window Mode = Normal

It then takes you to that record on the next form. This all works great,
but the problem is that, once you get there, you can't use the arrows at the
bottom to go forward or backward in the table because the last names have to
be equal. Is there a way to "release" that condition once you are
positioned at the correct record so that you will be able to maneuver
through the table? Thanks!
 
T

tina

when you use a WHERE clause on a form's recordset, what you're doing is
restricting the recordset to the record(s) that meet the specified criteria.
if only one record meets the criteria, then you can't navigate to other
records *because there are no other records in the recordset.*

if you want to allow the user to move to other records in the form, even
after choosing a specific record from the menu, the easiest thing would
probably be to put the combo box in the data entry form's Header section.
when the user opens the form, all records are available. to move to a
specific record, the user can choose a record from the combo box control in
the form header. put the following code in the combo box control's
AfterUpdate event procedure, as

Me.Recordset.FindFirst "[Student_Last_Name] = '" _
Me!ComboBoxName & "'"

substitute the correct name of the combo box control, of course. the above
assumes that [Student_Last_Name] is the name of the field in the data entry
form's RecordSource, and that it is a Text data type.

hth
 

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