Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

values based on another table/form

Status
Not open for further replies.

jramseyl

Technical User
Aug 30, 2000
5
US
I am relatively new to using Access. Will someone please explain to me how to mirror or copy (whatever the correct terminology is)a value that is entered into a form and have it automatically mirrored or copied into another form?

Thanks
 
Explain just a little more regarding the step by step action you already have, and what you would like it to do.
 
I have a database with multiple entries. (i.e., one client with lots of orders) I have used forms & subforms liberally and lots of tables throughout my database with command buttons and all of that good stuff. I would like the values I enter in on a "general Information" form to be reflected automatically in all of the other forms and subforms. (i.e. I would only like to enter the information once.) I have tried to copy information to forms/subforms, write update queries, and a couple of other things to make this work. I suspect it is something simple, i just need somone to get me over the top on this one.

Thanks


JRL
 
There are several ways to use information from one form on other forms. If you want the info you entered into one form to be entered into another form when you open it, then that could be done in the form current event.

Is your command button running a macro or code?
 
You can use the OpenArgs property. When you open a form you can specify an argument to be sent to the form to be opened. This argument can then be captured and used in the new form, maybe in a sql query if you like. Here´s an example:

'Call the new form
DoCmd.OpenForm "frmAny", , , , acFormEdit, , bestId

'Capture the argument in the new form
bestId=Forms!frmAny.OpenArgs

'Use the argument in a query
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT * FROM TempHI WHERE bestId = " & bestId & ";")

I hope this can be helpful to someone...
/Linus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top