My Assistant
![]() ![]() |
|
|
Apr 17 2012, 04:14 PM
Post
#1
|
|
|
UtterAccess Guru Posts: 564 From: Miami, FL |
Hi There, - Office 2010
I’m having a hard time running the following SQL CODE SELECT qry_none_signal_1.d_Date, qry_none_signal_1.d_By, qry_none_signal_1.FileName, qry_none_signal_1.d_Qiss, qry_none_signal_1.[Claim Id] FROM qry_none_signal_1 WHERE qry_none_signal_1.strDate Between Forms!frm_claims_main_report!txtDateFrom And Forms!frm_claims_main_report!txtDateTo ORDER BY CDate(tblFileName.d_Date); When I run the query with the form loaded by itself it works just fine, but when opened thru Navigation Form seems like the form is not loaded or in some type if state that SQL is not able to obtain the data needed. Does anybody know how to obtain data from navigation form? (textbox) This post has been edited by ScorpDevil: Apr 17 2012, 04:15 PM |
|
|
|
Apr 17 2012, 04:40 PM
Post
#2
|
|
|
Access Wiki and Forums Moderator Posts: 47,944 From: SoCal, USA |
Hi,
When you place a form in the Navigation Form, it is treated (or acts) as a Subform. Thus, you will have to modify your form reference in your query to look for a subform. Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 18 2012, 07:48 AM
Post
#3
|
|
|
UtterAccess Guru Posts: 564 From: Miami, FL |
DB,
Thanks a lot my friend..... Very strange way to go but seems to work. CODE SELECT qry_none_signal_1.strDate, qry_none_signal_1.strBy, qry_none_signal_1.FileName, qry_none_signal_1.strQiss, qry_none_signal_1.[Claim Id]
FROM qry_none_signal_1 WHERE qry_none_signal_1.strDate Between [Forms]![frm_claims_main]![NavigationSubform].[Form]![txtDateFrom] And [Forms]![frm_claims_main]![NavigationSubform].[Form]![txtDateTo] ORDER BY CDate(tblFileName.strDate); |
|
|
|
Apr 18 2012, 11:46 AM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 47,944 From: SoCal, USA |
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 10:13 AM |