Refresh Form On Enter

  • Thread starter Thread starter Lirva Smith via AccessMonster.com
  • Start date Start date
L

Lirva Smith via AccessMonster.com

I have a form that I use to search for records. I have the option to
double click on the record and it will take you to the main form. When I
get to the main form, the record I clicked on is the only one available.

What I would like is to stay on the current record when I enter the main
form, however, if I need to view other records they are also available.

I have tried different ways of doing this and nothing seems to work.
Honestly, I am stumped!

The main form is called: frmStudents
The search form is called: frmSearch

Any help will be very much appreciated. Thanks in advance!
 
Lirva:
You don't need a separate form to search. Put an unbound combobox control at
the top of your students form listing the students or whatever you're
searching for. You unbind the control by opening the properties and deleting
anything the the "Control Source" property.

On the After_Update event of the combobox filter the form:

Me.Filter = "StudentID = " & Me.combobox
Me.FilterOn = True

Make sure the bound column in you combobox is the studentID.
This will filter for the student in question. On your toolbar, you can
"unfilter" it with a button displayed there.

HTH
 
In this case I need to use a search form. Plus, I'm trying to prevent the
user from clicking on another button to get the task done. So what I would
like is when the user enters the Main Form from the Search Form I need it
to go to the record the user clicked on from the Search Form but have the
other records available.

Any suggestion how to do it this way?

Thank you!
 
Back
Top