Lookup Query

  • Thread starter Thread starter administrator
  • Start date Start date
A

administrator

I have a form with ID, Name, CDate and BKDate. I have
created a query that has parameters for Name and BKdate.
How can I get the answer from my query and show the data
on my form??? Does this make sense. I just need to be
able to look up information from the form.
 
administrator said:
I have a form with ID, Name, CDate and BKDate. I have
created a query that has parameters for Name and BKdate.
How can I get the answer from my query and show the data
on my form??? Does this make sense. I just need to be
able to look up information from the form.


Firstly, Name is a reserved word in Access so you should use something
different.

Secondly, no data or information are kept in Forms. Only Tables hold
any data. Queries organise it; Forms allow you to manipulate, enter
and view it on screeen; Reports enable you to print it on paper.

Please rephrase your question and someone will try to help you.

Hugh
 
-----Original Message-----



Firstly, Name is a reserved word in Access so you should use something
different.

Secondly, no data or information are kept in Forms. Only Tables hold
any data. Queries organise it; Forms allow you to manipulate, enter
and view it on screeen; Reports enable you to print it on paper.

Please rephrase your question and someone will try to help you.

Hugh
.
Hugh ..

Thanks for your help ... let me clarify ...

1. My actual control name is "FullName" not "Name" so
thats okay.
2. I realize that information is kept in tables not
forms.
3. I need to be able to recall information from the
underlying table to the form.

So if I have a FRMTickets that has an underlying table
TBLTickets and on the FRMTickets I
have "ID", "FullName", "BankDate", and "CurrentDate", how
can I do a search for an existing record. I have a "Find
Record" command button, however, it only lets me use one
parameter, ie either "FullName" or "BankDate" when I need
to find a record that has a certain "FullName" with a
certain "BankDate"

Hopefully, this helps.
 
Much clearer question now, so I will try to help a bit.

As you have realized a search on one item is fairly simple task. Multiple
items become a little more complex.

If you have some VBA coding skills, in the header of your form you could put
a combobox that holds a list of your fullnames along with an unbound text
box to enter the desired date and then code a command button to find the
record based on the entry of these two values. I would think that some
variation of this would be preferred. One variation would be a combobox with
the FullName that when you select this would populate a second combo with
the BankDates available for that person.

Another approach could be to setup a query that would have the RecordID ,
FullName and the BankDate that you could use as the recordsource for a
combobox that the combobox wizard could setup to find a record based on that
selection. This could be a pain if you have a lot of records.

Another approach could be to copy out your form and then base the copy on a
query that asks the user for the FullName and the BankDate and call the
second form from the first one.

If you narrow an approach down, I am sure that we can help with the details

Gary Miller
 
administrator said:
Hugh ..

Thanks for your help ... let me clarify ...

1. My actual control name is "FullName" not "Name" so
thats okay.
2. I realize that information is kept in tables not
forms.
3. I need to be able to recall information from the
underlying table to the form.

So if I have a FRMTickets that has an underlying table
TBLTickets and on the FRMTickets I
have "ID", "FullName", "BankDate", and "CurrentDate", how
can I do a search for an existing record. I have a "Find
Record" command button, however, it only lets me use one
parameter, ie either "FullName" or "BankDate" when I need
to find a record that has a certain "FullName" with a
certain "BankDate"

Hopefully, this helps.


Yes, that's much clearer, thanks! What Gary says should get you what
you want.

Hugh
 
I like the first option with the Combo Box the holds a
list of "fullname"s and then a second "bankdate" combo box
that will be populated with options from the selection
of "fullname". This also seems the most difficult
considering I little VBA skills.

I have created two combo boxes in my header. One
is "fullname" that lets me select a name and currently
populates the form with the name I selected. However,
since this is a combo box pulling from
TBLTickets.fullname, I have a choice of "Freeman B J" how
ever many times "Freeman B J" has entries. So for the 24
days of the fair, she could have 24 entries in
TBLTickets.fullname. Is it possible to have the combo box
pull from TBLEmployees.fullname instead?? Or will I have
to do that, since ... (see below)

I have also included a combo box in the header
for "BankDate". However, same problem exists. I could
have a "BankDate" 60 times (one for each seller). How do
I limit the "BankDate" combo box to the "Fullname"
selection?

Thanks again for any help. I'm just learning Access and
have no programming skills and the people on these
newsgroups have been wonderful about helping me out and
giving me answers. I'm finding this site absolutely
invaluable!
 
Back
Top