Paramter Update to query

  • Thread starter Thread starter jac007
  • Start date Start date
J

jac007

I have a table called 'temp_table' this table has a column named 'month_year'
and I would like to know how can I create a query where I can just update
that table with the month and year. So I want to be able to click on the
query and it will ask me to put in the month and year and it will
automatically update that field in that table. Can this be done and how?
 
I have a table called 'temp_table' this table has a column named 'month_year'
and I would like to know how can I create a query where I can just update
that table with the month and year. So I want to be able to click on the
query and it will ask me to put in the month and year and it will
automatically update that field in that table. Can this be done and how?

What's the datatype and appearnce of the month_year field? Is it a date/time
field? If so, it must contain a complete date with the day; you can use a
format such as yyyy-mm to just DISPLAY the year and month but it stores a day
(perhaps the 1st). Do you want to update all rows in the table? Just add a new
row? update a specific row?

More info please!

John W. Vinson [MVP]
 
The field is a number type and only can be 4 numbers. So when the query is
created i wanted to prompt me, "what numbers?" that way I just put "0108" and
it will only get that data.
 
The field is a number type and only can be 4 numbers. So when the query is
created i wanted to prompt me, "what numbers?" that way I just put "0108" and
it will only get that data.

Again:

Your question is ambiguous.

Do you want a prompt "what numbers?", and have the user type 108 (or
equivalently 0108) and find all the existing records in that table?

Or do you want the user to type 108 and have it update all rows in the table
to 108?

Or do you want to update only a subset of the rows to 108?

Or do you want to create a new record in the table with 108?

Or do you want newly added records to automatically fill in the current month
and year?

Any of these could be valid interpretations of your question.

John W. Vinson [MVP]
 
Back
Top