Autofill not working

TimjHebert

Registered User.
Local time
Today, 10:29
Joined
Dec 12, 2004
Messages
40
Hi Everyone! i have a database which i have uploaded a copy of. i have a form to enter customers and a main form with a subform. In the subform i have a combo box, but it does not fill the contact field. can someone tell me what is wrong?

Thanks,
Tim
 

Attachments

well...

I am not one to get into subforms.. in subforms, feedings details of of....

But here. Nice clean form that works... rs being you recordset in the event

Combo2
Events
Afterupdate() "new code"

rs... (0) ; (1) ; (2) ... whole table ... can now be assigned to any tect box you bring in.

I am a vb coding kind of guy. so this is a solution, but may not be what you wanted. I don't do subforms... I code and work with unbound forms... I like having 'control'... lol

:p

ps.. I added a reference for dao 3.6 which you will need, it is under references when you are coding in vs on events... anyways just keep using this db or ask how to get dao to work if you get lost....
 

Attachments

Works great

Thank you for the information, but it does not store the information from the customer. how do i do that?
 
Yes it does.

I explained....

rs(0) = table customers field1
rs(1) = table customers field2
rs(2) = table customers field3
rs(3) = table customers field4
rs(4) = table customers field5
rs(5) = table customers field6

so for example if you add another text box.

txtWhatever.value = rs(4)

would assign field 4 to the text box mate...

in the code supplied, before the recordset is closed... assign all the values of the record to the text boxes desired.

cool.?

if you still got prob's. make your new controls. name them as you wish, and make it clear what you want assigned to them as values and I will code it, but dude, you got the whole record in rs.

rs(0) .... rs(10) ... contains all the record. just assign it before it closes...

Re-use same code for any table to assign new values on other forms.

Only change is remove the ' ' in the query when searching for numbers....
 

Users who are viewing this thread

Back
Top Bottom