Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2005

Tip: Looking for answers? Try searching our database.

me.cb.Type?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 10 Feb 2005 16:30 GMT
Hello,

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.

Thanks

Tim
Tim - 10 Feb 2005 16:37 GMT
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
Tim Marshall - 11 Feb 2005 14:16 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

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

Chuck Grimsby - 12 Feb 2005 00:41 GMT
>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.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.