Updating fields

  • Thread starter Thread starter David Cleland
  • Start date Start date
D

David Cleland

Hi

I have a problem. I have a form and I want to update a field based on the
value of another field. The problem is the value is the second column. Ie
the field is a loop showing two fields but I am to use the second column not
the first.

if Me!User (but the second column of the lookup) = Yes then etc ?

David
 
David,

Can you explain what you mean by "the field is a loop?" Are we talking
about a combo or list box with multiple columns? Or, are you concantinating
two fields into one?
 
Sorry I meant the field is a lookup with two columns visible.

david
 
David,

I assume that you are talking about a combo box on a form. To reference
another column besides the bound column you simply specify the column index.

Example:

MyVariable = Me.MyComboBox.Column(1)

So based on your question you would place this code in the AfterUpdate event
for MyComboBox.

Example:

Sub MyComboBox_AfterUpdate()
MyVariable = nz(Me.MyComboBox.Column(1),"")
End Sub

I hope this helps. Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top