Getting values into a form

  • Thread starter Thread starter Praveen Manne
  • Start date Start date
P

Praveen Manne

Hi,

How to get values into a form, when the combo box value is changed?

for eg: combobox values: a, b, c (last names)

if I change the value in the combobox from a to b,
the first name field in the 'current form' should get its "Correct Value"
from another table, where the lastname matches.

Could you guys help me on this?

Thanks
Praveen
 
Why not base the combo box on the table where the last names resides rather
than create a combo box with the alphabet and then supply the first instance
of the lastname that starts with that letter?

Are you using your combo box to 'Find' a last name and call up that one
record into the form or just filter a group of records that start with a
particular letter of the alphabet?

If it the latter you can make a query using all the fields and use the query
to attach to the form. In the query under lastname you can type Like [Enter
letter or name] & "*" in the criteria section of that query. Then upon
opening the form, the user will get prompted to enter a value. Type the
letter 'a' (no quotes) and you will get all records where the lastname
starts with 'a'. Type 'ada' and you will get all last names where the first
three letters are 'ada' such Adams. You can also type the full name 'adam'
to only get those lastnames that match. If you press enter only, then all
records will show. This may be easier than what you are trying to do.
 
Hi ,

I have a different situation here. May be in my previous email I explained
it in a wrong way.
here it goes:

I have 2 tables
1. SSN, First Name, Last Name (1st table fields)
2. SSN, Order, Amount Paid (2nd table fields)

Now I have a form for the second table which contains a Combo Box for SSN. I
can 'choose' from one of the values of SSN Combo Box.

I have 4 text boxes for First Name, Last Name, Order, Amount Paid.
I will manually enter data into Order and Amount Paid textboxes.

But the problem is :

when I choose a SSN from the Combo box I want first Name and Last Name
textboxes to be filled with values from 1st table where the SSN matches.

Please Help

Thanks






GVaught said:
Why not base the combo box on the table where the last names resides rather
than create a combo box with the alphabet and then supply the first instance
of the lastname that starts with that letter?

Are you using your combo box to 'Find' a last name and call up that one
record into the form or just filter a group of records that start with a
particular letter of the alphabet?

If it the latter you can make a query using all the fields and use the query
to attach to the form. In the query under lastname you can type Like [Enter
letter or name] & "*" in the criteria section of that query. Then upon
opening the form, the user will get prompted to enter a value. Type the
letter 'a' (no quotes) and you will get all records where the lastname
starts with 'a'. Type 'ada' and you will get all last names where the first
three letters are 'ada' such Adams. You can also type the full name 'adam'
to only get those lastnames that match. If you press enter only, then all
records will show. This may be easier than what you are trying to do.

Praveen Manne said:
Hi,

How to get values into a form, when the combo box value is changed?

for eg: combobox values: a, b, c (last names)

if I change the value in the combobox from a to b,
the first name field in the 'current form' should get its "Correct Value"
from another table, where the lastname matches.

Could you guys help me on this?

Thanks
Praveen
 
Back
Top