Article View: be.comp.programming
Article #4074Re: HOWTO: use RowSource property of a field in MS Access table
From: Vladimir
Date: Wed, 17 Sep 2003 19:40
Date: Wed, 17 Sep 2003 19:40
50 lines
3094 bytes
3094 bytes
Hello, Programmer Dude <Chris@Sonnack.com> ����� � ���������:3F6775C4.B68635B6@Sonnack.com... > Vladimir wrote: > > > But why can't I get access to Properties collection of Field object? > > You can. Row Source is *NOT* a property of a Field. It's a property > of the ComboBox on the Form in Access. > Then how can I get those sort of properties? > > Also when I execute query SELECT <field> FROM <table> in Access > > Query Designer I get string. When I execute through ADO I get > > number. > > Are you saying you get "Above" in that case and "1" if you issue > an SQL statement through VC++? That's.... impossible. Something > else is going on. Are you sure the Query Designer isn't linking > in a table or doing some sort of lookup? > It is possible. You can create your own table in Access with one field having lookup with following properties: Display control = Combo Box Row ource type = Value list Row source = 1;"qwe";2;"asd";3;"zxc" Bound column = 1 Column count = 2 Column heads = No Column widths = 0cm;4cm List rows = 8 List width = 4cm Limit to list = Yes Then fill table with data and enter MANUALLY in Query Designer (View / SQL mode) this text: SELECT <field> FROM <table> - and you will get strings. > Take a look under the hood of that query and maybe look at the > definition of the table in question. Access can link to lookup > tables--did you design the database or did someone else? > I'm not but I've tried to design table as described above. Regards, Vladimir.
Technical Details
Message-ID:
<1063827758.127724@ufacom.ru>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.sovam.com!sovam!not-for-mailReferences:
<1063654572.733837@ufacom.ru> <3F661B99.F254B2B5@mmm.com> <1063692744.877932@ufacom.ru> <3F6775C4.B68635B6@Sonnack.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 113dfb,5c969b162d5156fa X-Google-Attributes: gid113dfb,public X-Google-Thread: 108717,5c969b162d5156fa X-Google-Attributes: gid108717,public X-Google-Thread: ff0ac,5c969b162d5156fa X-Google-Attributes: gidff0ac,public X-Google-Thread: fcea4,5c969b162d5156fa X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-09-17 12:50:05 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.sovam.com!sovam!not-for-mail From: "Vladimir" <genisoft@ufacom.ru> Newsgroups: be.comp.programming,comp.databases.ms-access,comp.os.ms-windows.programmer.win32,comp.programming Subject: Re: HOWTO: use RowSource property of a field in MS Access table Date: Thu, 18 Sep 2003 01:40:37 +0600 Organization: Ufa GTS Lines: 52 Message-ID: <1063827758.127724@ufacom.ru> References: <1063654572.733837@ufacom.ru> <3F661B99.F254B2B5@mmm.com> <1063692744.877932@ufacom.ru> <3F6775C4.B68635B6@Sonnack.com> NNTP-Posting-Host: 195.239.153.9 X-Trace: news.rol.ru 1063827759 12955 195.239.153.9 (17 Sep 2003 19:42:39 GMT) X-Complaints-To: abuse@online.ru NNTP-Posting-Date: Wed, 17 Sep 2003 19:42:39 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Cache-Post-Path: ufacom.ru!unknown@k17.ufacom.ru X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)