473,394 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Automatically Populating a Field

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 1454
MMcCarthy
14,534 Expert Mod 8TB
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
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...
2
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...
6
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...
1
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...
1
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...
13
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...
24
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...
2
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();"...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.