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

Need to copy column of data into Subform with click of a button

Status
Not open for further replies.

mightyatom13

Technical User
Oct 1, 2002
21
US
I have an ad tracking database tracking how much of each ad placed was for which product. The products change every week and we run a new ad every week. The ads are entered on a form. This form has a continuos subform with 2 fields. One to enter the product and one to enter the percentage of the ad related to the product. I also have a query that lists all current products that I draw my product list from. Currently, the subform has a combo box to select the product from. I need to be able to have the Ad entry subform create an entry for each product automatically with each new ad and then let me change the percentage of each. I want to not have to rely on a combo box, but have every product have an entry created so that nothing gets omitted when planning the ad.

I hope this makes sense. My subject is just what i was thinking might work. I have tried many things and am about at the end of my rope. Feel free to ask any questions. The products are actually concerts, which is why we have a constantly changing list of products to advertise. I have to bill the cost of the ads back to the show, which I pull from a report.
 
Hi mighty, (or high n mighty (lol) - no? Suit yourself),

I won't pretend to totally understand what you want exactly, but I think that you need to create a record for tableB in a subform from certain fields in tableA on a main form - no?

If so, then it's down to referencing fields on a form - from a subform or vice versa.

Create the new record on subform (frmSub), then try this...

"Forms![frmMain]![frmSub].Form.txta = Forms![frmMain].txta"

Obviously exchanging the form names with your form names and txta is a fieldname (or textbox name).

Hope this is near the mark.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
This will sound stupid, but where do I stick that formula? I am self taught and so am probably missing a few bits of info that are common knowledge to everyone else. Thanks for your help, Darrylle.
 
The form has various fields of info relating to the ad such as cost per inch, date, and whatnot. The subform looks like this after it is filled in:

Supersuckers 4
The Cramps 5
Queens Of Age 2
Planet X 3

each line is two fields (columns), one with the show, one with the ad units. The first column is a set of combo boxes. I would like to automatically create a record for each item in the combo box rather than having to go through and select the first item in the combo box on the first line, the second on the second line, and so on. The ad units can have a default value of 0 and I can then go through and change them. because the items in the combo box change daily, I need it to be generated each time I go to enter a new ad.

I have no idea if I am making sense on this. I hope you can follow me.
 
Hi Mighty,

No disrespect, and don't get me wrong.

I enjoy helping if I can, but this site is not a college site. I will go to the nth degree, but I ain't 'doing it' for anybody - I'd be stuck to the screen 24-7.

Someone may well come along and do it for you.

End of the day, you've got to invest some time in studying Access yourself. Get the basics at least, you sound like you have quite a technical background anyway.

ATB and kind regards,

Darrylle



"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Didn't take it wrong and wasn't asking someone to do it for me. Also, not in college (10 years ago). I built the data base and my boss wanted it to do something I didn't design it for. I have probably spent 15 or more hours trying to solve this problem and was coming here to see if anyone had any ideas. He was breathing down my neck to get it done. I am not sure what I was trying to do was even possible and have finally given up and just started rebuilding the database from scratch over the weekend in a way I think will solve the problem.

Anyway, I read some of your posts on other people's questions and got a couple ideas from you that way. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top