2 combo boxes for 1 field

MikeLeBen

Still struggling
Local time
Tomorrow, 00:31
Joined
Feb 10, 2011
Messages
187
I have a text field in a table that has an input mask like the following

[MON]-[YEAR]

example: APR-2011

Can two combo boxes be used to input the first and the latter part like in the following, let's say, "drawing"?

[___v]-[____v]
JAN 2011
FEB 2012
MAR 2013

and so on..
 
Sure,

Code:
Dim strbox1 as String
Dim strbox2 as String

strbox1 = combobox1.value
strbox2= combobox2.value

strbox1  & "v-" & strbox2
 
I mis-read your question. Let me make another example to fill the combos
 
basically I think you provided the right code for the task, just not all of it.

That is, at this point, how do I assign the string
strbox1 & "v-" & strbox2
to the Date field at the current record in my table?
 
I gave up and changed my table's structure to have two different fields for month and year, so that my 2 combo boxes are bound to each of those.

I then use the SQL syntax
+ ' ' +
to concatenate the result so that it shows in a single column in my listboxes, read
http://www.1keydata.com/sql/sql-concatenate.html
for further information.
 

Users who are viewing this thread

Back
Top Bottom