Full Version: AfterUpdate event inputting values into combo box
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
oz_miner
G'day! I'm wondering if you could help me on this one.
I have two combo boxes: Date and DayNight. I select a value from Date, say 16/2/05. Then I select a value from DayNight, say 'Day'. I have still another combo box DateDayNight, and this is to join the two together. I.e. After 'Day' would be selected from the DayNight box, the third combo would automatically display "16/2/05 | Day". How can this be done? I know this code for inputting the one value:

me.datedaynight.value="16/2/05"

But I don't know how to put the two values together (the above wasn't a very good example, though).

I'd appreciate your help.
rbaron
If I am reading your question correctly the idea is to take the two values of the other combo boxes and populate the information with a pipe between them. You would concatanate the informaiton into the third combo, but you may be better to use a text box then a combo. Either way this is how you could accomplish this.

if you use a combo box
[datedaynight].column(0) = [date] & "|" & [daynight]

If you use a textbox

[datedaynight]=[date] & "|" & [daynight]

Hope this helps
oz_miner
Cheers, mate! You gave me an idea.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.