Assigning Variable from Combo Box

E

Edgar Thoemmes

I have a combo box bound to a table, the row source is based on a query of
the table returning 3 fields (ID, TimePeriod and NumberDays)

How can I assign the value of NumberDays to a variable?

I am trying to create a dynamic SQL statement like:

strExpired = "tblContracts.EndDate<Date()+" & VARIABLE & " And
tblContracts.EndDate>Date()"

Thanks
 
N

Nikos Yannacopoulos

Edgar,

The syntax to refer to the third column of the current selection of a combo
on a form is:

Forms!FormName!ComboName.Column(2)

(the index of the first column is 0).

HTH,
Nikos
 

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

Similar Threads


Top