reuse form

D

deb

Using Access 2003

I have a main form with tabs.
Within each tab I need a subform that is used to store links to attachments.

I have the form for attachments built however I would like to use the same
form in each tab and just change the row source in the AttachmentType field.

Is this possible?
How do I make it change the attachment subform's combo box's row source when
user click on the specific tab?

Main Form is f001ProjectReview (PK ProjectID)
Tabs are Financial, Outages, Shipping and Contracts
Subform I want to use is f020Attachments (PK AttachmentID, SK ProjectID)
with a combo box called AttachmentTypeSubID

The current row source for the combo box is ...
SELECT t22AttachTypeSub.AttachTypeSubID, t22AttachTypeSub.AttachmentType,
t22AttachTypeSub.AttachmentTab
FROM t22AttachTypeSub
WHERE (((t22AttachTypeSub.AttachmentTab)="Financials"))
ORDER BY t22AttachTypeSub.AttachmentType;


I will need to have different where clause for each tab.

Thank you in advance for your help.
 
P

Paul Shapiro

deb said:
Using Access 2003

I have a main form with tabs.
Within each tab I need a subform that is used to store links to
attachments.

I have the form for attachments built however I would like to use the same
form in each tab and just change the row source in the AttachmentType
field.

Is this possible?
How do I make it change the attachment subform's combo box's row source
when
user click on the specific tab?

Main Form is f001ProjectReview (PK ProjectID)
Tabs are Financial, Outages, Shipping and Contracts
Subform I want to use is f020Attachments (PK AttachmentID, SK ProjectID)
with a combo box called AttachmentTypeSubID

The current row source for the combo box is ...
SELECT t22AttachTypeSub.AttachTypeSubID, t22AttachTypeSub.AttachmentType,
t22AttachTypeSub.AttachmentTab
FROM t22AttachTypeSub
WHERE (((t22AttachTypeSub.AttachmentTab)="Financials"))
ORDER BY t22AttachTypeSub.AttachmentType;

I will need to have different where clause for each tab.

Maybe a single subform with radio buttons or a combo box for the "tab"
choices would be a simpler UI? Whatever control you use to let the user
change the subform, write an event handler for the control's AfterUpdate
event. In the event handler, use the control value to assign the correct
record source to the single subform and/or a combo box on that subform.
 
D

deb

Thank you for your response.

The combobox to select tab choice will not work. Not user friendly enough
for my group. they want the program to make sure it is the correct selection.

The row souce must automatically change when the user selects the specific
tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top