Form Design question

GS1

Registered User.
Local time
Today, 23:12
Joined
Jul 3, 2002
Messages
30
Hi

My database holds details of department activities in a table named 'Activities' (somewhat unsurprisingly)

each different type of activity has its own seperate form, to aid data entry. The problem that i have is that 2 activites are related - Deals and Press releases.

A Deal will almost always have a related Press release, but a Press release could be made for other reasons. To this end, I have added a combo box to the Press releases form that looks up the names of the deals on the system, and lets the user select a related deal if required.

What I would like to do is bring info about the related deal into fields on the Press Releases form if a related deal is selected, but allow the user to populate these fields themselves if their is no related deal.

I have seen answers to similar questions on this board, but my problem is that i want to take data from the same table as I need to put it into.

Any suggestions would be greatly appreciated...

Thanks

G :)
 
The easiest way to do this is in your deals combo include all the date you may want to show on the form in the rowsource query. You can hide them by setting the calue of that column in the combo to 0
Then, on the After_Update of the DealsCombo set the values on the forms to those that are selected in the combo. For example
ComboDeals Query
Fields: Id, DealName, DealDate, CompanyInvolved etc
Columns 0;;0;0 - this will only display the DealName

on the After_Update

me.NameOfDealDateControl = me.NameofDealsCombo.Column(2) 'Combo columns start at 0
me.NameofCompanyInvolvedControl = me.NameOfDealsCombo.Column(3)

This way, if you select a deal, it will populate the fields for you and will leave them blank if you do not.

HTH
 
Thanks!

:D

Thanks for your reply - that's done the trick

G
 

Users who are viewing this thread

Back
Top Bottom