Update field value for all records from user input

B

Beginner

I have access databases with its table imported from Excel
via macro. I need two extra fields Month and Year(which
are not in the excel data) in the table.
For every set of data imported, the month and year values
for all the records are the same(but the month need not be
the current month)
Is there a possibility to enable user interaction so that
the user determines the values of these two fields ?
I tried using openform action in the macro.
I am not exactly sure how to update a field with one value
from the form, for all the records being imported.Any help
is highly appreciated.

(I have been using macros and queries for a while but not
forms)

Thanks in advance
Beginner
 
J

John Vinson

Is there a possibility to enable user interaction so that
the user determines the values of these two fields ?

Sure. Use an Update Query, updating the Month and Year fields (which,
by the way, are reserved words for the Month() and Year() functions -
you might want to change the fieldnames!) to

[Forms]![NameOfYourForm]![NameOfTheControl]
 

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