473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Help with syntax for where clause

Hi All,
Need help with the right statement for the following situation.
In Access97 I have a Form(frmComplaintUpdate) which has a Tab
Control(called TabCtl987) with several tabs(first tab we'll call
tbComplInfo). tbComplInfo has a subform(sbfrmComplaintInfo), on it,
that subform has two dropdowns(names-cboStatus, cboStatDesc).
The values displayed in the second dropdown are dependant on the value
chosen in the first dropdown. So, in the rowsource of the second
dropdown(looking at it in query grid mode)is

SELECT DISTINCTROW tblComplaintStatusTypes.StatusDescription FROM
tblComplaintStatusTypes WHERE
(((tblComplaintStatusTypes.ComplaintStatus)=[Forms]![frmComplaintUpdate]![sbfrmComplaintInfo].[Form]![cboStatus]));

What's Not working is the right side of the where clause -
[Forms]![frmComplaintUpdate]![sbfrmComplaintInfo].[Form]![cboStatus]

I know it's the syntax of it and that's what I'm stuck on, how do
I express

Display Status Descriptions Where ComplaintStatus equals the value
selected in cboStatus which sits on a subform which sits on a tab which
is in a tabcontrol which sits on a form

Thanks in advance for any assistance with this
bobh.

Nov 13 '05 #1
1 1220
Bobh,
My head hurts. I like things simple because I am an English major and all
this long, intricate reference to a deeply embedded object stuff starts to
make me feel small in the shadow of all these brighter math students I share
this group with . . . Ok, enough with the verbal fart. I tend to unbind the
combo box in a case like this and have it change the value of a module level
or application level variable or property. That way the source object can
refer to a simple variable name when it is setting the value and the
destination object can similarly refer to a simple variable name. With
Properties I gain the ability to make some choices about what value to
return when either no value is given by the source object or an
unnacceptable value is supplied by the source object. I hope this helps.
--
Alan Webb
kn*******@SPAMhotmail.com
"It's not IT, it's IS"

<vu******@isp.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi All,
Need help with the right statement for the following situation.
In Access97 I have a Form(frmComplaintUpdate) which has a Tab
Control(called TabCtl987) with several tabs(first tab we'll call
tbComplInfo). tbComplInfo has a subform(sbfrmComplaintInfo), on it,
that subform has two dropdowns(names-cboStatus, cboStatDesc).
The values displayed in the second dropdown are dependant on the value
chosen in the first dropdown. So, in the rowsource of the second
dropdown(looking at it in query grid mode)is

SELECT DISTINCTROW tblComplaintStatusTypes.StatusDescription FROM
tblComplaintStatusTypes WHERE
(((tblComplaintStatusTypes.ComplaintStatus)=[Forms]![frmComplaintUpdate]![sbfrmComplaintInfo].[Form]![cboStatus]));

What's Not working is the right side of the where clause -
[Forms]![frmComplaintUpdate]![sbfrmComplaintInfo].[Form]![cboStatus]

I know it's the syntax of it and that's what I'm stuck on, how do
I express

Display Status Descriptions Where ComplaintStatus equals the value
selected in cboStatus which sits on a subform which sits on a tab which
is in a tabcontrol which sits on a form

Thanks in advance for any assistance with this
bobh.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dave | last post by:
I have 2 tables, one with names, and another with addresses, joined by their CIVICID number (unique to the ADDRESSINFO table) in Oracle. I need to update a field in the NAMEINFO table for a...
4
by: Chad Richardson | last post by:
I've always been mistified why you can't use a column alias in the group by clause (i.e. you have to re-iterate the entire expression in the group by clause after having already done it once in the...
2
by: aj70000 | last post by:
This is my query select ano,max(date),a_subject from MY_TAB where table_name='xyz' and ano=877 group by a_subject,ano order by a_subject ANO max(Date) A_Subject 877 2005-01-20...
8
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
3
by: Jerry | last post by:
Well, here is some weirdness. First, I noticed that I have 2 Set keywords (silly me). so I removed the 2nd "Set" but still got a syntax error. Then I removed the Where clause, and now it works...
8
by: Jerry | last post by:
I am a MySQL and PHP newbie. I am having trouble getting the $w variable in my code below passed to mysql. When I use the value of $w directly in the Where clause, the correct rows are returned....
11
by: Frankie | last post by:
Hello: New user here...first post to group. I'm getting an SQL syntax error when I try to run the following query: $query = sprintf("SELECT itemNumber, entryDate, modifyDate, thumbnailURL,...
3
by: MikeY | last post by:
Hi everyone, I'm having problems with my WHERE Clause syntax with in my SQL CommandText. The error that it is display is "You Have No Data". My problem lies with in the WHERE clause not finding...
5
by: Sam | last post by:
Hi, I have one table like : MyTable {field1, field2, startdate, enddate} I want to have the count of field1 between startdate and enddate, and the count of field2 where field2 = 1 between...
1
by: teddymeu | last post by:
Hi Guys, trying to bulk insert a csv file into my SQL database from an asp.net vb web app/form page that the user uploads, my problem is that im new to all this and although the SQL statement...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.