472,110 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

Want my subform info to autopopulate...

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.
Nov 12 '05 #1
2 3105
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
Nov 12 '05 #2
Fork_In_Road wrote:
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.


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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jbroome | last post: by
2 posts views Thread by Fork_In_Road | last post: by
1 post views Thread by Stephen D Cook | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.