Creating user input form

J

Jeffh

I have two tables, Class and CostTable

The Class table has just a primary key and a text field called Class. The
CostTable has a primary key called CostID and fields for Class,
SizeBeginRange, SizeEndRange and Cost. I set up a relationship between Class
in the Class table and Class in the CostTable.

I am running the following query which gives me the correct result.

SELECT [Enter Sq Ft]*[Cost] AS [Total Cost], CostTable.CLASS,
CostTable.SizeBeginRange, CostTable.SizeEndRange FROM CostTable WHERE
(((CostTable.CLASS)=[Enter Class]) AND ((CostTable.SizeBeginRange)<=[Enter Sq
ft]) AND ((CostTable.SizeEndRange)>=[Enter Sq ft]));

I would like somehow to tie this query to a user form. I would like one
text box where the user enters the square feet and a second one where they
can enter the class. The second one could even be a combo box since the
values will never change and it may actually be easier to choose from a list
of existing options. Lastly, I would like the results to be displayed in
another text box. Any suggestions on setting this up would be appreciated. I
have tried several ways and always get the same result.... #NAME? in the
text box for the result. Remember that my query work perfectly when I run it
manually.
 

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