Search with subform

teemplaya

New member
Local time
Today, 04:39
Joined
Aug 6, 2004
Messages
7
I've got a menu/switchboard that opens 2 forms:

1. [practice_staff_coding]
2. [frmstaff_search]

Both forms contain the subform:
3. [tblnon_standard_software subform]

The record source for 1. is:
SELECT [tblpractice_staff].[upi], [tblpractice_staff].[last_name], [tblpractice_staff].[first_name], [tblpractice_staff].[admin_rights_reason], [tblnon_standard_software].[product_name] FROM tblpractice_staff LEFT JOIN tblnon_standard_software ON [tblpractice_staff].[upi]=[tblnon_standard_software].[upi];

With the subform (3.) using [tblnon_standard_software subform] as the Source Object with both Child and Master Link fields [upi].

#2 is unbound for search purposes but still contains #3 designed and setup exactly the way it is in #1.

In the click event of my search button on #2., I receive a Syntax error. Here is the SELECT statement in the button:
strSQL = "SELECT tblpractice_staff.upi, tblpractice_staff.last_name, tblpractice_staff.first_name, tblpractice_staff.admin_rights_reason " & _
"tblnon_standard_software.product_name, tblnon_standard_software.date_of_install " & _
"FROM tblpractice_staff LEFT JOIN tblnon_standard_software ON tblpractice_staff.upi = tblnon_standard_software.upi"


I want to be able to search for staff and have not only the info asked for in my WHERE clause, but also the non standard software installed for that staff in #3.

I hope I've included all the information needed in order to get the help I desire.

Thanks all,
teemplaya
 
Is there anyone who could help?

I hope I was able to precisely describe my situation and left no one confused.

As far as the db tables.... A staff member can be granted admin rights and/or have non-standard software installed on any given day. The same software can be installed for other staff members.

I will include screen shot of relationship window. Am I headed in the right direction? And what do you think is wrong with the syntax of my SQL statement?

teemplaya
 

Attachments

My apologies

I apologize to those I contacted directly. I will not do that anymore. Is there anyone out there who could help me?

There is no i in team,
teemplaya
 

Users who are viewing this thread

Back
Top Bottom