populate sub-form using drop-down

C

clayton ledford

Hello,

I have a form that is not linked to any tables. I have added a sub-form
(data-sheet view) linked to the table that i want to update information in.
Most fields will be manually updated. However, two fields will be the same
for all records (ultimately appended to a larger table where those fields
will be different from other records).

For the purpose of my form, is there a way to update all records in the
sub-form for that specific field using a drop-down list located on the main
form?

Or... any other suggestions to accomplish this so the user doesn't have to
update each field with the same info.

Thanks,

Clay
 
J

Jeanette Cunningham

Hi clayton ledford,
maybe a default value would be easiest here.
Set the default value for these 2 controls and the data will be
automatically entered for them.

Or you could put a button on the form.
The button would have code that runs an update query ( or append if that is
what's needed).
You can create a saved query or you can put the sql of the query into vba.
Your button runs the query like this-->
Dim strSQL as String
strSQL = yadda etc
CurrentDb.Execute strSQL, dbFailOnError
 

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

Similar Threads

Access Form Refresh 1
Drop down boxes 1
Form question 3
audit trail 7
Automatically fill in some fields in data entry form 1
Forms 2
Type mismatch in expression 2
Sub Form 1

Top