G
Guest
I have two problems with my main form and subforms:
1. I have a continuous subform and a main form with comboboxes and with
Link Child Fields - [Accountable] , Link Master Fields - [cboUserName] having
the Table1 as a data source. Everything is working perfectly.
If I choose a username from the cboUserName the subform shows the data. But,
when I assign a value to the cboUserName programmatically
Me.cboUserName.Requery
Me.cboUserName = somename on the main Form load event the subform doesn't
show enything.
2. I have another comboboxe and textboxes (cboCode and txtDate1 and
txtDate2) on the Main Form and I'd like to filter data using them too. The
cboCode and cboUserName should filter the data independently however the
dates should filter the data in conjunction with eather cboCode or
cboUserName. The cboCode can filter data by Code or to show all data
(choosing "ALL"), or show part of the data (choosing "All Departments").
I've created a query that can do all those types of filtering. As a query
it's working very well with all those combinations of choosing different
comboboxes and dates on a main form. But, when I'm trying to use this query
as a data source for my subform without any child or master fields the
subform shows nothing. I've added Forms!MainForm!subform.requery on the
combobox afterupdate event but it doesn't help too.
Can anybody advise how I could handle with all this?
Thanks
1. I have a continuous subform and a main form with comboboxes and with
Link Child Fields - [Accountable] , Link Master Fields - [cboUserName] having
the Table1 as a data source. Everything is working perfectly.
If I choose a username from the cboUserName the subform shows the data. But,
when I assign a value to the cboUserName programmatically
Me.cboUserName.Requery
Me.cboUserName = somename on the main Form load event the subform doesn't
show enything.
2. I have another comboboxe and textboxes (cboCode and txtDate1 and
txtDate2) on the Main Form and I'd like to filter data using them too. The
cboCode and cboUserName should filter the data independently however the
dates should filter the data in conjunction with eather cboCode or
cboUserName. The cboCode can filter data by Code or to show all data
(choosing "ALL"), or show part of the data (choosing "All Departments").
I've created a query that can do all those types of filtering. As a query
it's working very well with all those combinations of choosing different
comboboxes and dates on a main form. But, when I'm trying to use this query
as a data source for my subform without any child or master fields the
subform shows nothing. I've added Forms!MainForm!subform.requery on the
combobox afterupdate event but it doesn't help too.
Can anybody advise how I could handle with all this?
Thanks