Forgot to add that I'm using Access 2002
Tim
pietlinden@hotmail.com - 10 Feb 2005 18:38 GMT
> Forgot to add that I'm using Access 2002
>
> Tim
you may need to go through the columns collection, as a combobox can
have any number of columns. So it's probably
cboSomeCombo.Column(x).Type
> How am I supposed to get the type. It even works for other combobox
> with a value list. What don't I understand. I'm using DAO. I would like
> the datatype of the field and not the data entered.
me.cb.RowSourceType

Signature
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Tim Marshall - 11 Feb 2005 14:19 GMT
>> How am I supposed to get the type. It even works for other combobox
>> with a value list. What don't I understand. I'm using DAO. I would like
>> the datatype of the field and not the data entered.
>
> me.cb.RowSourceType
Sorry, misread, disregard.

Signature
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
>I'm trying to create a change log for database
>I get a runtime error 438 while tying to get the type of a bound
>combo-box (table/query) control.
>How am I supposed to get the type. It even works for other combobox
>with a value list. What don't I understand. I'm using DAO. I would like
>the datatype of the field and not the data entered.
You want the datatype of the _field_, not of the control. So, you want
to look at Me.Recordsource.Fields("Field name of bound control").Type
Obviously, you'll need to change the field name to whatever the heck
the *real* name of the control's field is...
You also need to realize that what you are going to get is a number
which will tell you what the type is. If you're looking for something
like the word "Text", or "Long", or "Date", you'll need to do that
translation yourself, or search this newsgroup at google groups for
"dbtype" where you'll find several functions that will translate it
for you.

Signature
A Bird In The Hand Will Doo Doo On You.