Connecting Tech Pros Worldwide Help | Site Map

Want my subform info to autopopulate...

Fork_In_Road
Guest
 
Posts: n/a
#1: Nov 12 '05
I have a main form with customer names & addresses, and a subform that
I want to have the following: I wish to pull up an equipment name with
a combo box (from my "equipment" table); then have the unit price and
a monthly maximum charge auto-populate in the subform (both values are
in the "equipment" table as well). Why am I having such a tough time
with this? Have tried to create a form/subform with both the wizard
and the toolbox/subform tool. Not having any luck. Suggestions?
Thanks in advance.
Lumpierbritches
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Want my subform info to autopopulate...


You might want to create a query on the fly and use the following:

Air Code

Field1 = querycombo.column(0)
Field2 = querycombo.column(1)
Field3 = querycombo.column(2)

etc etc

Rename the fields names to the textboxes you wish to auto populate. Rename the
combox to the name of your combobox and use the code in the afterupdate.

HTH

Michael
Salad
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Want my subform info to autopopulate...


Fork_In_Road wrote:
[color=blue]
> I have a main form with customer names & addresses, and a subform that
> I want to have the following: I wish to pull up an equipment name with
> a combo box (from my "equipment" table); then have the unit price and
> a monthly maximum charge auto-populate in the subform (both values are
> in the "equipment" table as well). Why am I having such a tough time
> with this? Have tried to create a form/subform with both the wizard
> and the toolbox/subform tool. Not having any luck. Suggestions?
> Thanks in advance.[/color]

Besides advice already provided...MF = Main form, SubForm = SF. You
reference a field like this
Forms!MF!SF!ID = ...
Or
Me!SF!ID = ...

To get the recordsource of SF you enter
strSource = Forms!MF!SF.Form.RecordSource



Closed Thread


Similar Microsoft Access / VBA bytes