What am I doing wrong???

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

What am I doing wrong???

Post by Egg 'n' Bacon »

Really simple thing; putting in a query criteria based on a combo box in a form (e.g. like [forms]![frmEtc]![cboSelect]). But the criteria is not getting picked up & the query is coming up blank.

Any ideas (see attached)

TIA

E&B
ElecTest.zip
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: What am I doing wrong???

Post by HansV »

The bound column of the combo box corresponds to the numeric ID field of tblEquip, not to the Type field.
Set the Row Source of the combo box to

SELECT DISTINCT tblEquip.Type FROM tblEquip

Set Column Count to 1 and clear the Column Widths property.
Best wishes,
Hans

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

Re: What am I doing wrong???

Post by Egg 'n' Bacon »

OK I can see the problem, but the query is still coming up blank when any criteria is selected :(

PS I'm using 2003 format from a 2007 install.

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

Re: What am I doing wrong???

Post by Egg 'n' Bacon »

Never mind, had made a typo :newbrain:

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: What am I doing wrong???

Post by HansV »

See the attached version.
ElecTest.zip
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

Re: What am I doing wrong???

Post by Egg 'n' Bacon »

Thank you Hans :clever:

User avatar
HansV
Administrator
Posts: 78512
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: What am I doing wrong???

Post by HansV »

I had missed your previous reply, sorry.
Best wishes,
Hans