By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

Update from a form

P: 2
I have a form that pulls in a selected number of records from a table using a parameter query that I enter parameter each time. I want to add a date in a field to all of these records that are in the form using an update query without running through another Update query entering the same parameters. Any help would be appreciated.

Thanks in advance!
Feb 20 '08 #1
Share this Question
Share on Google+
5 Replies


jeffstl
Expert 100+
P: 432
Um....I THINK i know what you said, but lets see.

It sounds like you want a date entered into a bunch of records? Like a data entry problem? Except you want to be able to do all the records at once?

Or are you saying you want to use a date to be your parameter for searching these records?
Feb 20 '08 #2

NeoPa
Expert Mod 15k+
P: 31,768
The OP wants a way of referencing the recordset which is driving the current form.
As the user will have helped to specify the recordset by entering parameters, this is not simply done by referring to the RecordSource property of the form.

Try using Me.RecordsetClone (or possibly even Me.Recordset). I don't think there's a simple way of getting a SQL string if that's what you're after.
Feb 21 '08 #3

P: 2
Um....I THINK i know what you said, but lets see.

It sounds like you want a date entered into a bunch of records? Like a data entry problem? Except you want to be able to do all the records at once?

Or are you saying you want to use a date to be your parameter for searching these records?

Yeah I want to enter a date into a bunch of these records from a query I have loaded into a from a select query.
Feb 21 '08 #4

NeoPa
Expert Mod 15k+
P: 31,768
Yeah I want to enter a date into a bunch of these records from a query I have loaded into a from a select query.
That's to clarify?
Perhaps you would like to reread your post and rephrase it using real sentences. There was obviously confusion understanding your first post, yet you hit the trigger on your second before checking it made sense.
Feb 21 '08 #5

jeffstl
Expert 100+
P: 432
OK, well Im still not sure exactly what you mean or "where you are at" in terms of getting this to work..

However, I would just say that it sounds like you want to write code that will loop through an SQL Insert statement with a WHERE clause....

Like...
Expand|Select|Wrap|Line Numbers
  1. Do While Condition
  2.      sql = "INSERT INTO MyTable (date1) VALUES (MyNewDate) WHERE condition"
  3.      MyDbConn.execute sql
  4. loop
  5.  
I guess if this is what your looking for try it out and post specific problems you have as your trying it.
Feb 22 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.