Subform with Lookup Text Boxes

I

Igor

Hello,

I want to create a subform that has 4 text boxes, the first two simply looks
up values from a table based on the input in the third text box (Document
Number) - which inputs values into another table.

(Table 1 and Table 2 are related by the field corresponding to the third
text box, the "input" box, which is the primary key in Table 2.)

For example: If I input "4" into the third text box in the subform the other
two text boxes should display the corresponding values, but not input
anything.

This means that the third text box (the input text box) inputs the
information into Table 1 and the first two text boxes simply look up the
corresponding values from Table 2.

The form is solely used to input information into Table 1.

I tried to do this using a query but I get an error saying "Index or primary
key cannot contain Null value".

This is the SQL for the query:

SELECT [Index].[File], [Index].Title, [To 3P].[Document Number]
FROM [Index] INNER JOIN [To 3P] ON [Index].[Document Number] = [To
3P].[Document Number];

I would appreciate any help you could give me!
 
I

Igor

Sorry, the SQL was incomplete on the first line:

SELECT [Index].[File], [Index].Title, [To 3P].[Document Number], [To
3P].Revision
FROM [Index] INNER JOIN [To 3P] ON [Index].[Document Number] = [To
3P].[Document Number];

I hope you can tell me what I'm doing wrong.
 

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