Form Sorting and Adding Records

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?
 
C

Clifford Bass

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top