Using SubForms (1 Viewer)

JezLisle

Registered User.
Local time
Today, 02:47
Joined
Jul 27, 2007
Messages
67
I have an Access Front End DB and SQL Server Back End, on a form I have they are all unbound controls. I have a Form_Load routine that runs an SQL on opening of the form. I have on the form a ComboBox which I want to select the options, once chosen the Category in the list it will display an ID number in a TextBox.

I have another Combo that the user can change the Reporting Month they are looking at.

What I am trying to do is this. In a SubForm I want to put a table of data. When ComboBox1 is selected and displays the data I want it to change the Subform to reflect this and the same for the Month

On my Subform I have a TextBox for both the ComboBoxID and the ReportingMonth

How can I do this?
 

ezfriend

Registered User.
Local time
Yesterday, 18:47
Joined
Nov 24, 2006
Messages
242
I am assuming that your sub-form uses a different query to pull the data. If that's the case, you can programmatically modify the query for you subform so that the correct information are being retrieved, Once that's done, just refresh/reload your subform.
 

JezLisle

Registered User.
Local time
Today, 02:47
Joined
Jul 27, 2007
Messages
67
Yes, the sub form has its own query.

Do you mean that on my subform I also have a Form_Open routine and then link the 2 forms together?

How would I link them?
 

bohemian9485

Registered User.
Local time
Today, 09:47
Joined
Jun 28, 2009
Messages
17
In form design view, put the name of the foreign key field name from the query of the subform in the link child field property and the name of the combobox in the link master field property under the data tab of the subform control's property window.
 

Users who are viewing this thread

Top Bottom