Using Customer ID to autofill new form

Gazza2

Registered User.
Local time
Today, 15:37
Joined
Nov 25, 2004
Messages
184
I have a table with customers details(Address Etc) but there is too many for me to use a combo or list box so i would like to use a text box.
Here lies my problem.
What i need is to be able to enter into a text box on form1 the first few letters of the customer ID no and this will open a hidden subform that will list the customers with those first few letters.
I then want to be able to select one from the list using the number keys and once i press enter it opens another form(form2) with all the customer information already inserted into the text boxes on form2.
 
Nearly There

The idea in the query is what i want but there is a few changes that i need which i cant seem to figure out.
When i run the query it opens a form with Enter Parameter Value in the top bar but i want it to open up a form i have designed.
Then once i enter the name and press enter it opens up a datasheet with all the suppliers but i need it to open another form i have designed with all the details already entered into the correct text boxes.

Thanks for the help so far.
 
You might still consider using the combo drop down box.
When you type in the field it will automatically go to the letter section following:
typing la .. will move to like lap,
typeing lar .. will move to like larry,
when they get there they can click on the down arrow and select the choice.
(also should probably limit to list).

If you need to fill in the form from data from a table you would do it after change, update something like:

namechange box (looks up data in table customer).
you would query for name, address, phone, etc. but just display name in the box the others would be hidden.
after change/update
you would have some vb code similar to this

me.address = name.column(1)
me.phone = name.column(2)

the me. refers to current form and the name.column refers to the query lookup on name, address, phone. where address is the second column and phone is the third column (name is actually the first column).
hope this helps some.
 
Unsure

I can get form1 to open by selecting it from the menu then when i type a name into form1 and press enter it opens up form2 but it doesn`t display the information into the boxes for the particular Supplier/Customer from my table.
I think i understand the code(me.etc) you have written but does it go into the form afterupdate or do i have to do it seperately for every text box that i want to display information.
 
sorry didn't get right back. busy at work...
IF i understand it correctly you have
form1 where they type in the first few characters of a company
this looks up co names in a companytable (which also has addresses in it).
then you open a 2nd form where they choose from a sublist of companytable by a no selector.
which opens a third form with the data (address,etc) fields populated.
------
my opinion is you should start with the third form (which I'll call form1 below) - on the company name field is where you would allow people to type in the name. popup the second form.
on the second form where they select the company no. you would do on change (or on update,etc) code.

something like - (in the vb code section)
on companychange
[Forms]![form1]![companyname] = currentformname.fieldname (not sure if me.fieldname would work might have to specify full currentformname).
(this will populate form1 with the lookup on form 2 on form2 when you are querying the name, address, etc. you can hide some of the extraneous stuff if you need)
at the end of that code you would close the second form

leave the first form active while they select from the second form.

If I didnt explain enough. type in your field names, and which forms they are on and i'll see if i can lay it out better. (just include the fields that are applicable.)
 
stumped

i have been fiddling about with this for weeks now and cant get the right info into form 2.

In form1(supplier select) i have a text box(text1) that is unbound and is used to type the supplier name required.
Once the name is typed into this text box and the enter key is pressed then form2(supplier details) opens up.This works fine but no matter what supplier i enter into the text box on form1 it opens up form2 at the first record from the supplier details table.
What i want to get is the details from the supplier details table of the supplier name i type in only.

thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom