Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I Query By Report, like I QBF?

Status
Not open for further replies.

webfaktor

Technical User
May 22, 2001
22
0
0
Hi,

The code below allows me to Query By Form, i.e., I can make an information selection via a combo box in my QBF form, press a command button that activates code seen below and the results appear in the QBF's parent form.

Can this type of data retrieval be established for Reports?

Thanks in advance - Michael


Function glrQBF_DoHide(frm As Form)
Dim varSQL As Variant
Dim strParentForm As String

'Get the name of the Parent form
strParentForm = Left(CStr(frm.Name), Len(CStr(frm.Name)) - 4)
'Create the approprite Where clause based on the fields with data in them
varSQL = glrDoQBF(CStr(frm.Name), False)

'Open the Parent form filtered with the Where clause genereated above
DoCmd.OpenForm strParentForm, acNormal, , varSQL
'Make this *_QBF form invisible
frm.Visible = False

End Function
 
An additional thought to my above question:

Can I alter above code to have results of selection made in QBF form appear, Not in its parent form, but within a report?

Technologically challenged,

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top