Auto populate fields

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:49
Joined
Mar 24, 2014
Messages
364
Hi
In a form, I have a comboBox with 3 columns.
I update the field and with this piece of code,
I update two more fields based on this comboBox data/columns.
Code:
Me.EUR.Value = Me.Combo37.Column(2)
Me.USD.Value = Me.Combo37.Column(3)

I wonder if I can update fields which are not parts of a combo.
For example, suppose I have a form with two fields, DATE and USD,
Once I update the DATE field, this event, auto populates the USD exchange rate field.
 
Hi


...I wonder if I can update fields which are not parts of a combo.
For example, suppose I have a form with two fields, DATE and USD,
Once I update the DATE field, this event, auto populates the USD exchange rate field.
To save confusion please try to use the correct terminology. Forms have controls not fields.
Date is a reserved word in Access so it would be better not to use it as a name for anything. It would be better to use a more meaningful name eg: StartDate, EndDate,TranactionDate etc.
You could use the AfterUpdate event of the "Date" control to populate the USD control. How would you determine the correct value to be entered?
 
You are right Bob, it is my mistake, new in access.

Well, suppose the the AfterUpdate event works like this.
Once user updates "DateIn" control, then a dlookup function finds the correct value and updates another control

For example, this works in a combo box
Me.EUR.Value = Me.Combo37.Column(2)

How can I make it if , instead of .column(2) , i use dlookup ?


Ps, not only new in access, I am not a native English speaker, this is an additional obstacle.
 

Users who are viewing this thread

Back
Top Bottom