Andy Lacey
andy at minstersystems.co.uk
Sat Jan 31 09:08:34 CST 2004
Oleg Do something like this Dim stDocName As String Dim strSQL as string strSQL = "[employee name] = '" & Me!employeenumber stDocName = "Carol" DoCmd.OpenReport stDocName, acPreview, , strSQL However you seem to be comparing a field called Employee Number against a form control called EmployeeNumber. Did you mean to? Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Oleg_123 at xuppa.com > Sent: 30 January 2004 20:59 > To: accessd at databaseadvisors.com > Subject: [AccessD] Opening report on desired record > > > Hey Group > > I have a form that opens report, and I'd like it open on the > record thats selected on the form. Bith are coming from the > same table. How can I do that ? (i am in access97) textbox is > called employeenumber > > > > Dim stDocName As String > > stDocName = "Carol" > DoCmd.OpenReport stDocName, acPreview > where stDocName![employee name] = Me.employeenumber.Text > > > ----------------------------------------- > Get Breaking News from CNN, ABC, NBC, CBS Now. > http://www.xuppa.com/news/?link=webmail > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/a> ccessd > Website: > http://www.databaseadvisors.com > >