help!!!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi i am in urgent need of creating a way that a person can use a combo box on
a main form to search and automatically go to the selected information on
another form
 
In this code my combo on my form is called cmbFind, the form I am opening is
called clients & the unique identifier for the record to find is in column 1
of my combo box.

Private Sub cmbFind_AfterUpdate()
Application.Echo False
DoCmd.OpenForm "Clients"
DoCmd.FindRecord cmbFind.Column(0), acEntire, , acSearchAll, , acAll, True
Application.Echo True
end sub
 
Add a combo box to your form using the wizard. Choose "Find a record on my
form based on the selection" or something like that.
 
Hi Dennis, what i have is only a very simple database only involving 2 forms;
1 is 'main' and the 2nd is 'vehicle registration'. what i wanted the uses to
be able to do is enter a vehicle registration number into the 'main' page and
if it is in the system then the full record containing that rego number in
the 'vehicle registration' form will open. If the number entered isn't in
the system then they have the option to add it to the system. could you tell
me what is the best way to go about this and how?
 
What is the record source for each form? If the record source for each form
is a table (or a query based on the table), is there a relationship between
the tables?
 
The record source for both forms is a table.

BruceM said:
What is the record source for each form? If the record source for each form
is a table (or a query based on the table), is there a relationship between
the tables?
 
May I take that to mean the record source for each form is a separate table?
If so, what is stored in the main form's table), and what is the relationship
(if any) between the tables?
 
hi sorry it has been awhile, but to answer your question, there is only one
table and the two forms get there info from that one table, the relationship
between the two forms is only that one 'main' is where the i put the search
details in and the second form 'rego info' is where the info will be
displayed once it is located in the search.
 
Back
Top