If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
needing help with "strWhere" statement
I'm using a button to print a report, based on the "AISPID" on the current
record on form "frmAnnualISPReview_subform" I seem to have my syntax wrong, again. If ""[forms]![frmAnnualISPReview_subform]![AISPID]" points to the field on the form that I want to print my report for. What does "Me.AISPID" point to? Is the syntax where the field on the report = the field on the report? Where do the "" fit in if the fields are numeric? strWhere = "[forms]![frmAnnualISPReview_subform]![AISPID] = " & Me.AISPID DoCmd.OpenReport "rptAnnualISPReview", acViewPreview, , strWhere Thanks Kelvin |
#2
|
|||
|
|||
needing help with "strWhere" statement
Generally, you put the Field first, then the form control (although I doubt
if it makes much difference). Like this: strWhere = "[AISPID] = " & [forms]![frmAnnualISPReview_subform]![AISPID] [AISPID] being a field in the recordsource of your report. And [forms]![frmAnnualISPReview_subform]![AISPID] being a textbox on your form. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "Kelvin Beaton" kelvin at mccsa dot com wrote in message ... I'm using a button to print a report, based on the "AISPID" on the current record on form "frmAnnualISPReview_subform" I seem to have my syntax wrong, again. If ""[forms]![frmAnnualISPReview_subform]![AISPID]" points to the field on the form that I want to print my report for. What does "Me.AISPID" point to? Is the syntax where the field on the report = the field on the report? Where do the "" fit in if the fields are numeric? strWhere = "[forms]![frmAnnualISPReview_subform]![AISPID] = " & Me.AISPID DoCmd.OpenReport "rptAnnualISPReview", acViewPreview, , strWhere Thanks Kelvin |
Thread Tools | |
Display Modes | |
|
|