Where do I put "Me!TrAddress = Me!Combo206.Column(1) "?
add the code to the combo box's AfterUpdate event procedure. for illustrated
instructions on how to create an event procedure, go to
http://home.att.net/~california.db/instructions.html and scroll down to
"Create a VBA event procedure".
hth
Ken & Tina,
I am extremely new to this. However, I don't think there is
any redundancy. The "DispatchTable" is storing data as it
is entered into the form. Creating a "new" record. The address
will be different on occasion. The form is used to create record(s).
Where do I put "Me.TrAddress = Me. Combo206.Column(1) "?
Do I add "TrAddress" to the form" and put it into the After Update?l, or
do
I put it into the "DispatchTable" under "TrAddress"? AND, where
do I put it?
I'm a dummie when it comes to this. I need a step by step
description. i.e. right click on control, click on properties, etc.....
Thank you both for your help!
Tom
:
Tom:
Assuming the form is bound to the DispatchTable table an its the current
record you want to update with the value, in the combo box's AfterUpdate
event procedure assign the value to the field:
Me.TrAddress = Me. Combo206.Column(1)
However, as Tina has said, you need to consider whether or not this
constitutes redundancy. If the value in the other table on which the
combo
box is drawing is variable over time, i.e. it can be changed, but you
want
the value in the DispatchTable to remain constant at that when the
record was
inserted into that table, even if the value has changed in the combo
box's
table, then there is no redundancy as the TrAddress column is
functionally
dependent on the key of the DispatchTable. If on the other hand the
values
in both tables should always be the same, then the column is not
functionally
dependent on the key and there is redundancy and you should not store
the
value in the DispatchTable but map to it via a query whenever required.
There is a situation analogous to the first scenario (no redundancy) in
the
sample Northwind database, where the Orders Subform looks up and stores
values from the Products table in the UnitPrice column of the Order
Details
table. This is because while the unit price of a product might change
you
want each order to reflect the price at the time the order was made.
BTW I'd suggest that when you add controls to a form you give then a
meaningful name immediately, cboSuppliers say, rather than sticking with
the
default arbitrary names like Combo206 which Access assigns to them by
default. When you refer to the controls in code it then becomes mush me
readable and easy to understand what its doing.
Ken Sheridan
Stafford, England
:
I have a control "Text208" on my form "DispatchForm" that is unbound.
The control sourse of "Text208" is tied to "=[Combo206].Column(1)".
What I want to happen.
I would like the information that is recorded into "Text208" to be
input automatically into my database "DispatchTable" into field
"TrAddress".
Help me please....
TOM