473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically Populating a Field

1 New Member
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.

Paul
Mar 30 '07 #1
1 1462
MMcCarthy
14,534 Recognized Expert Moderator MVP
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()
  2.  
  3.    Me!SubformObjectName!PYID.DefaultValue = Me!PYID
  4.  
  5. End Sub
  6.  
Mary
Apr 1 '07 #2

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

Similar topics

1
2100
by: Svelte Poshy | last post by:
Populating a field in a table depending on another In my table customers i want to populate the field segmenid depending on the choice in the lookup field Typeid. Both fields, typeid and segmentid are placed in the table Customers. The field Typeid is a lookup field, looking in the table Type.
2
1420
by: Danny J. Lesandrini | last post by:
I searched Google but couldn't find any reference to this one, though I've observed the behavior before. The current case is where I select a value in a combo box, which has a Long Integer as it's bound value. After updating this value and moving to the next record, the field directly after the combo gets populated with the same value as...
6
14306
by: p.mc | last post by:
Hi all, I have a MS SQLServer database which has two tables, 'images' and 'photographers'. The photographer table contains a field for PhotographerID and a one for PhotographerName. The image table also contains a field for photographerID which is used to join the two tables. I'm having problems with populating a dropDownList using the...
1
1454
by: marksjy | last post by:
I have a small database with a primary key similar to a social security number (SSN). The tables are tied to the primary table via the SSN-type field with referential integrity. I have a number of click buttons that allow the user to navigate between screens. When I go to enter data on these forms (which use the child tables), how do I get...
1
1735
by: devagupt | last post by:
I have 2 tables , Production table and the Total table. The production table is made from a form and the total table just has data in it. I need to populate 2 fields from the total table into the production table. They both have a common field being the Vial #. Sometimes there are 2 identical vial # for a product but they are packed on a...
13
3525
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The first 7 have to do with respondent information like grade, class and age. I have those in a table with a PK of RespondentId, which is autonumbered....
24
2104
by: alive84 | last post by:
Hi, I am trying to solve a problem since more than 8days, without any real progresses and I am once again begging for help from you guys. I am trying to attempted a Form automatization, ie a user chooses a CostCenter from a dropbox and then automatically a field OrgUnit and Region should be filled with the corresponding "value". (Table...
2
1952
by: Alexio | last post by:
Sample code snippet - <td align="right">Check Amount:&nbsp;</td> (1) <td><input type="text" name="CHK_input_1" size="19"style="text-align:right" onkeyup="calcCB();" onBlur="currency(this); calcCB();" tabindex="26"> (2) <input type="hidden" name="OBKey__53_1" id="kw_check_amount" > For various database reasons, I...
3
3558
by: davenumber40 | last post by:
I’m creating a small database in Access 2003(XP) to track issues during software testing. As far as databases go, it’s going to be a relatively small, short term project (No more than 20,000 records in the main table over about 2 months). I have a main table (Issues) that is populated by a form (IssueAdds). On my form there is a combobox to...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.