for the Click on the Combo Box Reroute_Contacts (Design View), bring up
the
properties window (ALT + Enter) Locate the AfterUpdate (Events tab)
Paste / Write the code
Same For The Form (make sure the properties read [Event Procedure]
afterwards, or else you have so much unused/"dead" code
--
Pieter Wijnen
My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/
Since I think my brain has taken a vacation - Where exactly do I put
the
code?
:
Use Code to access the column!
ie
Private Sub Reroute_Contacts_AfterUpdate()
Me.ShowName.Value ==Me.[Reroute Contacts].Column(1)
End Sub
Private Sub Form_Current()
Reroute_Contacts_AfterUpdate
End Sub
HTH
Pieter
Boy, there's a lot of you boys & gals who enjoy hitting [] <g>
I changed the name of the combo box to see if that works and I am
still
getting the same error message - I have tried all the ways that I
have
researched to do the auto populate and nothing seems to work - I
tried
to
do
the query one and when I try to associate the form with the query -
my
form
comes up blank - I didn't quite under stand the DLookUp one - I was
using
the
information that I found under the accesstips website.
:
From what you say there shouldn't be a problem as far as I can
see.
Firstly
check that its not just a simple spelling error in the name of the
combo
box
when you refer to it in the unbound control's ControlSource.
I note that Reroute Contacts appears to be the name of both the
combo
box
and a table. I wouldn't have thought that would be a problem, but
try
changing the combo box's Name property to something like
cboRerouteContacts
and amend the unbound control's ControlSource accordingly.
Otherwise I have to confess that it foxes me.
Ken Sheridan
Stafford, England
:
I do have the = in the ControlSource property in the unbound
text -
I
also
made sure to verify that I have the correct numbers in the
ColumnCount
and
Bound Column properties - I am still coming up with the same
error
message -
Is there anything else that I might try?
:
It may simply be that the ControlSouce property of the unbound
text
box is
missing the = sign before the reference to the second column of
the
combo box:
=[Reroute Contacts].[Column](1)
The combo box's ControlSource should be a foreign key field in
the
form's
underlying table which references the primary key of the
Reroute
Contacts
table. This primary key field should be the first column of
the
combo box's
RowSource property and the address the second. The combo box's
BoundColumn
property should be 1 and its ColumnCount property 2. When you
select
an item
from the combo box the value from its first column should show
in
the
combo
box and the value from the second column in the unbound text
box.
Ken Sheridan
Stafford, England
:
I have attempted to auto populate a field on my form -
The form is attached to a table and the combo box that I am
using
is
attached to another table. The combo box is named Reroute
Contacts - I
created a query that only includes the 2 fields that I need
from
the Reroute
contacts table. I want to auto populate the address portion
of
the
box -
I set up a query with only the Contacts and the addresses and
when
I tried
to set up and unbound textbox I put the following value in -
[Reroute
Contacts].[Column](1) - when I go back to the form the only
thing
populating
in the box is - #Name? - Can someone please advise me of what
I
am
doing
wrong?
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4388 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4426 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!