Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to enter data in a query

Status
Not open for further replies.

hpl2001

Programmer
Dec 18, 2001
105
CA
(crosspost)

I'm trying to create a query to use as the source for an input form. When I run my query, I can get to the new record line, but I am unable to enter data unless I enter a field for the Box table first. I expect users will want to enter data starting with the ClientId. Can this be done?

SELECT
File.ClientID,
File.DOB,
File.[Last Name],
File.[First Name],
File.[Middle Name 1],
File.[Middle Name 2],
File.[Middle Name 3],
File.Suffix,
File.Alias,
File.[File Comment],
Box.Year,
Box.[Box Number],
Box.Location,
Box.Facility,
Box.[Transfer Number],
Box.[Schedule Number],
Box.[Box Comment],
File.Key

FROM File RIGHT JOIN Box ON (File.Year = Box.Year) AND (File.[Box Number] = Box.[Box Number]);
 
As a rule of thumb, the recordsources for data entry forms should be one table.

In a case where you want to show parent and child records, I would suggest you use a sub form for one of the tables.

But most elementary, you might change the direction of your join from RIGHT to LEFT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top