Single Field/Record Table

T

Tee See

Using an input box I can assign a numerical value to a variable. How can I
"PUT" that value into a single field/record table for use in query
calculations?

Regards
 
D

Duane Hookom

Do you mind providing a reason for this question? I'm not sure why you would
go through the trouble of an InputBox() when you can use a form bound to
your table.
 
J

John Vinson

Using an input box I can assign a numerical value to a variable. How can I
"PUT" that value into a single field/record table for use in query
calculations?

Regards

InputBox is rarely either necessary or the best way to do this. You
can use the syntax

=[Forms]![YourFormName]![Textboxname]

as a query criterion or as a calculated field in a query; there's no
need to put the data into a Table for the purpose.

Or am I misunderstanding your requirement? How would the table be
used?

John W. Vinson[MVP]
 
T

Tee See

The only reason I ask is that I tried the form approach but I just kept
adding records to the table. What I am trying to do is at the beginning of
wach day input the US/CAN exchange rate for use in query calcs. So I only
ever want one value in my table at all times.
 
J

John Vinson

The only reason I ask is that I tried the form approach but I just kept
adding records to the table. What I am trying to do is at the beginning of
wach day input the US/CAN exchange rate for use in query calcs. So I only
ever want one value in my table at all times.

An alternative is to use an unbound textbox on your form.

If you do want the single-record table, use TWO fields: an Integer
Primary Key with a value of 1 and a validation rule of =1, and the
exchange rate.

You might want to consider KEEPING all the exchange rates for use with
historic queries; just use the date as the Primary Key.

John W. Vinson[MVP]
 
Top