Question Populate unbound txtbox with combo box after update event (1 Viewer)

josephbupe

Registered User.
Local time
Today, 12:41
Joined
Jan 31, 2008
Messages
247
Hi,

I am populating a table using combo boxes in a continuous form. The box box alone works fine without any issue of repeated data. But as you know obviously the combo box only populates data in a single column of the table, in which case mine is the LASTNAME; so now I am attempting to populate a unbound textbox with the FIRSTNAME side-by-side with the combo box for the same record.

In the After Update event of the cboLASTNAME:

Code:
Me.txtFIRSTNAME = Me.cboLASTNAME.Column(3)

However, after updating the the combo the textbox data is repeated.

Is there a possible solution to this?

Joseph
 

Attachments

  • screenshort.png
    screenshort.png
    11 KB · Views: 86

Dezirous

Rafi Ahmed
Local time
Today, 13:41
Joined
Jul 8, 2009
Messages
71
Hi Dear,

can you please let me know the rowSource of you combo and columnWidth value?

Suggestion for you Problem: Use dlookup("[Lastname]","tblName","[ID]=" & Me.cboLASTNAME & "")

Like me.txtFirstName = dlookup("[Lastname]","tblName","[ID]=" & Me.cboLASTNAME & "")
 

John Big Booty

AWF VIP
Local time
Today, 19:41
Joined
Aug 29, 2005
Messages
8,263
The problem is that you are using that technique on a continuous or Data-sheet form.

When you have a field that derives it's data from a field in the current record, on either of those types of form, then all instances of that derived control will reflect the data held in the record that currently holds focus.

You can get around this by using a query to populate your form and then using a pop-up form to add records to the underlying tables.
 

Users who are viewing this thread

Top Bottom