By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

syntax question

P: n/a
WHERE (tblTxJournal.TxAcct_ID IN (SELECT TxAcct_ID FROM tblTxAcct)) AND
(DatePart("q",[TxDate])=2) AND
(Year([TxDate])=[Forms]![frmMain]![frmTo]![cbxYear_To]) ...

is this okay, or should the last part be:

[Forms]![frmMain]![frmTo].[Form]![cbxYear_To])

Thanks in advance...

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Actually, either will probably work, since you are using the ! instead of a period.

The [frmTo] part needs to be the name of the control on the main form that holds the
subform, not the name of the subform itself.

--
Wayne Morgan
"deko" <dj****@hotmail.com> wrote in message
news:Me***************@newssvr27.news.prodigy.com. ..
WHERE (tblTxJournal.TxAcct_ID IN (SELECT TxAcct_ID FROM tblTxAcct)) AND
(DatePart("q",[TxDate])=2) AND
(Year([TxDate])=[Forms]![frmMain]![frmTo]![cbxYear_To]) ...

is this okay, or should the last part be:

[Forms]![frmMain]![frmTo].[Form]![cbxYear_To])

Thanks in advance...

Nov 12 '05 #2

P: n/a
From what I've read elsewhere, [Forms]![frmMain]![frmTo].[Form]![cbxYear_To]
is the "full path" - it seems this is the more reliable way to go... I need
a rule to follow, so this might as well be it.

thanks for the reply!

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:nh******************@newssvr33.news.prodigy.c om...
Actually, either will probably work, since you are using the ! instead of a period.
The [frmTo] part needs to be the name of the control on the main form that holds the subform, not the name of the subform itself.

--
Wayne Morgan
"deko" <dj****@hotmail.com> wrote in message
news:Me***************@newssvr27.news.prodigy.com. ..
WHERE (tblTxJournal.TxAcct_ID IN (SELECT TxAcct_ID FROM tblTxAcct)) AND
(DatePart("q",[TxDate])=2) AND
(Year([TxDate])=[Forms]![frmMain]![frmTo]![cbxYear_To]) ...

is this okay, or should the last part be:

[Forms]![frmMain]![frmTo].[Form]![cbxYear_To])

Thanks in advance...


Nov 12 '05 #3

P: n/a
You won't go wrong by spelling it out. The other way you have to know what
the defaults are.

--
Wayne Morgan
"deko" <dj****@hotmail.com> wrote in message
news:vK****************@newssvr25.news.prodigy.com ...
From what I've read elsewhere, [Forms]![frmMain]![frmTo].[Form]![cbxYear_To] is the "full path" - it seems this is the more reliable way to go... I need a rule to follow, so this might as well be it.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.