Form Sorting and Adding Records

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I'm creating a form that contains a subform and need each column in the sub
form to be sortable. My problem is that to enable sorting by each column, my
sql statement must contain joins to the tables that contain the fields like
first and last name. For example, if the subform's data table contains a
field that holds an integer value for employee id and that employee id value
is related to an employee table that contains the employee's first and last
names, to enable sorting by first and last names, my sql statement must
contain a join to the employees table.

So, when I use a join sql statement in the subform, the subform becomes
unable to be "added" to because of the join. I can edit any of the records,
but can not add a new record. Is there any way around this so the subform
can be sorted, yet still have the capability for adding records?
 
Hi Scott,

Try making the join to the employee table an outer join, with the
employee table on the outer side. That is "select xxx from tblSomeTable
outer join tblEmployees on .....".

Clifford Bass
 
Back
Top