Creating a form to search from 2 fields

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

Guest

I am making this database where it has 2 fields that i want teh user to
search for
phone # and customer name. I am wondering if i can have 2 unbound or even 1
unbound box and a command box to do the search and grabs it onto the form
where the ubound boxes are. What I have is on teh left hand side teh search
boxes and on the other side all the other fields, waiting to be filled once
the search begins.
I made a query and it works but it only spits in another window and in
datasheet form. I would like it so that once i type in a phone # or a
customer name, the other fields will populate with teh data
 
The easy way is to build a query to be used as the record source for your
form. Put the criteria for the phone like --
Like "*" & [Enter phone number]
This allows you to enter the last part of the number.

Put customer criteria like --
Like [Enter customer name] & "*"
This allow you to enter just the begining of the name.
 
ok, i did the query and made a form, but i want an unbound box for the field
of the phone and another one for the customer name. Whatver box u type in,
the command will popluate the field,
how can i do that,

KARL DEWEY said:
The easy way is to build a query to be used as the record source for your
form. Put the criteria for the phone like --
Like "*" & [Enter phone number]
This allows you to enter the last part of the number.

Put customer criteria like --
Like [Enter customer name] & "*"
This allow you to enter just the begining of the name.


Justin said:
I am making this database where it has 2 fields that i want teh user to
search for
phone # and customer name. I am wondering if i can have 2 unbound or even 1
unbound box and a command box to do the search and grabs it onto the form
where the ubound boxes are. What I have is on teh left hand side teh search
boxes and on the other side all the other fields, waiting to be filled once
the search begins.
I made a query and it works but it only spits in another window and in
datasheet form. I would like it so that once i type in a phone # or a
customer name, the other fields will populate with teh data
 
maybe u could a combo-box where its row source type = Table/Query
and then, its row source is a simple SQL containing the corresponding field
from your table.
example: row source = "SELECT [MyTable].CustomerName FROM [MyTable];" for
your unbound textbox for customer name.

no commands needed. when u type something in the combo box, it auto
populates the nerest match.





Justin said:
ok, i did the query and made a form, but i want an unbound box for the field
of the phone and another one for the customer name. Whatver box u type in,
the command will popluate the field,
how can i do that,

KARL DEWEY said:
The easy way is to build a query to be used as the record source for your
form. Put the criteria for the phone like --
Like "*" & [Enter phone number]
This allows you to enter the last part of the number.

Put customer criteria like --
Like [Enter customer name] & "*"
This allow you to enter just the begining of the name.


Justin said:
I am making this database where it has 2 fields that i want teh user to
search for
phone # and customer name. I am wondering if i can have 2 unbound or even 1
unbound box and a command box to do the search and grabs it onto the form
where the ubound boxes are. What I have is on teh left hand side teh search
boxes and on the other side all the other fields, waiting to be filled once
the search begins.
I made a query and it works but it only spits in another window and in
datasheet form. I would like it so that once i type in a phone # or a
customer name, the other fields will populate with teh data
 

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

Back
Top