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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Record(s) Across Tabbed Subforms as Default 1

Status
Not open for further replies.

Accesser

Technical User
Jun 3, 2002
44
US
Hi there,

I'm trying to devise a way for a user to click a check box or something on a main form that sets the data for that record, including all of its linked data in records across several tabbed subforms, as the the default for the next main record (and linked records in the subforms).

Do you know of an approach or any code that could do this?--copy or carry over values in a main form as well as its subform records to the next main and subforms?

Thanks much,

Eric
 
Hi

Not sure I understand your question.

If you have sub forms (even on tabs) and the data is reallted to the main form, if you set the Master/Child Link field properties of the sub form control(s) the Access will do all the work without any code

Hope this helps Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Basically, I just want an option for a user to be able to set the current values in the current main form (and associated values in the subforms) as the default for the next record. I'd like the values to automatically fill in, but be able to be typed over/edited. I've done this on a small scale for individual fields, such as

MyTextBox.DefaultValue = MyTextbox

but not on a large scale, with an entire record and it's linked subform records.
 
Hi

Ah Now I see.

You could do a for each loop, moving through all controls on form and set ctl.defaultvalue = ctl.value

you would have to jazz it up a bit to bypass labels etc (either trap error and resume next or test controltype proerty should allow for that

Hope this helps Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Ah, now I see as well. Thanks.

I'm fairly new to VBA and know that anything's possible somehow; it's just figuring out the somehow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top