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

create 5 new records and enter values on form open

Status
Not open for further replies.

ali32uk

Technical User
Mar 31, 2011
22
0
0
GB
Hi All

I m looking for a little help with an access DB I m creating, it has a sub form called SubPromotedProducts, on opening the the master form Step2_AssetAssignment, I d like 5 new records to be entered into the subform automatically, as below

Untitled_h4zavq.png



this image shows the desired result, so 5 records are created which inputs the following

- "1" to "5" in "No." (record name is NumberCount)
- "promoted Product" in each of the AssetType field
- SponsorshipID is the subform master/child link so would enter the corresponding sponsorshipID from the master form, in this scenario its "7"

I d then like the ability to add any new records to be suppressed, i.e. the user can only populate in the created fields under ProductSKU

I ve had a look about and cant find how to achieve this automatically

Any help would be greatly received!

BR

Alastair
 
I just saw your question. Have you had any progress to date?

If not, hopefully this'll help:

[ol 1]
[li]Add 5 records: Unless there are specific requirements which cannot be handled this way, I'd do so with a query (query object or SQL query) adding 5 records to your underlying table.[/li]
[li]"1" to "5" can be handled by having an Autonumber field for your table if that works, but then it'll be 6-10 the 2nd time, and so forth. If you have to have 1 - 5 each time, then it'll take more effort, but there are at least 2 or 3 options to handle that.[/li]
[li]"Promoted Product" can be handled within the query[/li]
[li]Ability to add new records supressed: that's a form setting you can set from the get go. So this way the query will add your records, and then you won't add anyone to manually add records.[/li]
[/ol]

Let us know if this gets you started, and at what point you get stuck if any at all.


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top