By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

Automatically Populating a Field

P: 1
Hello anyone any idea how to do this.
The problem I am having has to do with Continuous Forms.

In the header of the form I have 4 Combo boxes. For now lets just work on one combo box. The combo box name is 'PYID'. The table name is 'Invoice' and the field name is 'PYID' and that field is column 3. Thats if in access columns start at 0.

OK What I want to do is this, when a user selects a value from PYID combo box in header it will be the same value for all entries in the Continuous Form. So when the those entries are save to table 'Invoice' all the PYID field values are the same for that session of the form. Not all the PYID entries in the table only the entries for that form session.

Any questions ask.
Thanks for the help.

Mar 30 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 14,534
Hi Paul,

Firstly name the combobox something else to avoid confusion. For now I'll go with cboPYID

In the AfterUpdate of the combobox set the subforms default value for PYID to the third column of the combobox.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboPYID_AfterUpdate()
  3.    Me!SubformObjectName!PYID.DefaultValue = Me!PYID
  5. End Sub
Apr 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.