Sounds like your situation does warrant
the copying of the data from A to B - much like a template. As long as the
fields need to change independently of each other (like the membership cost),
you need to store them separately.
If you have problems getting it to work, let us
know...
Tom Oakes
Personal PC Consultants, Inc.
[EMAIL PROTECTED]
503.230.0911 (O)
402.968.6946 (C)
734.264.0911 (F)
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of David R
Sent: Wednesday, January 04, 2006 12:14 PM
To: [email protected]
Subject: RE: [AccessDevelopers] Form populating multiple fields from one table
Hi
Tom:
Thanks
VERY MUCH. I am going to try this out now. Not sure If I fully understand what
you're saying but will decipher it best I can. One thing I didn't mention is the
"recordsource" for my FORM is Table "B" where everything is being
stored.
As far
as being "necessary" correct my logic if I'm wrong but, The fields consist of
data that will/may change in the future. IE: One field (a an example) contains
the "COST" of a particular membership. for instance, a single membership for one
year costs $499 now. BUT if the the price changes for a yearly membership
changes next month we still honor the $499 but NEW members pay $XXX.00. So
typical normalization rules can't apply here......Am I correct or is there a
better way than storing the CURRENT data in the fields? Other types of
data I have as either "lookup" or calculated and not tored such as expiration
dates etc.
Thanks
Again...I am going to try your suggestions. I'm sure it'll work if I can
understand it. I am NOT VB comfortable but AM able to make great messes using
VB.
=Dave
R.=
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Oakes
Sent: Wednesday, January 04, 2006 2:57 PM
To: [email protected]
Subject: RE: [AccessDevelopers] Form populating multiple fields from one tableSo, you're basically wanting to transfer data from table "A" to table "B" via the selection from the dropdown?You'll want to:1) Add the additional columns from table "A" to the source (query) for the dropdown.2) Set up the column properties on the dropdown so the additional columns can be read via code. Increase the column count to represent the number of fields you're pulling from table "A". Modify the column widths so each column has a width, even if it's zero. (You can't read the value from code unless the column has a width).In the dropdown's AfterUpdate event, set the values:Me.TextField1 = Me.cboDropdown.Column(1)
Me.TextField2 = Me.cboDropdown.Column(2)etc., etc.Keep in mind that the columns in comboboxes are zero-based, so the first column is Column(0), the second is Column(1), etc.'**************************************************'You need to ask yourself if this is really necessary, however.'**************************************************'Unless there is a valid reason for holding the data from table "A" separately in table "B", you don't need to do any of this: storing the PrimaryKey from "A" as a foreign key in "B" will suffice. You can link the tables together via the keys, which is one of the principals of normalization.Hope that helps you.Tom Oakes
Personal PC Consultants, Inc.
[EMAIL PROTECTED]
503.230.0911 (O)
402.968.6946 (C)
734.264.0911 (F)
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of David R
Sent: Wednesday, January 04, 2006 11:37 AM
To: [email protected]
Subject: [AccessDevelopers] Form populating multiple fields from one tableHi All:Although I'm not new to Access I'm stumped on this one. If you can help, Please keep in mind I mainly use wizards and any reference to VB should be worded "for the complete idiot". Thanks. I'll try to keep this simple:1). I have two tables. One with 10 columns.2). I have a form with 1 drop down box and 9 fields.3). The drop down box selects one record from table "A" with the "key" being the selected field filler.4). After fields on the form are populated they need to be saved as a new record in Table "B" (Along with some other unmentioned typed in info)I would like to populate the remaining fields with the data from the other columns. I have no problem filling in the field on the drop down box BUT, I need the syntaxAND method of finding the remaining column fields and sticking it in the form fields. Here's a simplified example:col1 col2 col3 col4 col5data1 data2 data3 data4 data5key===========================Form:Field1 Dropdown box (selects field1's data "key")FormField2 should be data2FormField3 should be data3etc........And ALL should be saved into table "B"Can anyone help....Thanks=Dave R.=
Please zip all files prior to uploading to Files section.
YAHOO! GROUPS LINKS
- Visit your group "AccessDevelopers" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
