I basically need to change an SQL statement to include data from 4 tables - all of which may or may not contain a record relating to the user who logged in. I need to set it up via 1 SQL statement and not by using several data controls or adodc connections.

The data is coming from an Access 2000 database containing 4 tables:

Details (Primary key = user)
Notes (Primary key = noteid)
Vehicle (Primary key = regno)
History (Primary key = bookingid)

The relationships between these are:

Details to Vehicle = Field named user
Details to Notes = Field named user
Vehicle to History = Field named regno

So far I can view data from the Details table and the Notes table when a user logs in by using this statement:

sqltemp="select * from details left outer join notes " & _
" on details.USER = notes.USER where details.USER = '"
sqltemp=sqltemp & myname & "'"

(i.e Notes field is sometimes blank)

I am having trouble modifying this statement that would allow me to view details from Vehicle and the History table for the user that logged in. Can anyone help with the SQL statement as I really am stuck on this one!