Vba subform recordsource not updating Senior chatrooms in new jersey

Posted by / 31-May-2016 19:56

Vba subform recordsource not updating

Data is returned and will successfully populate lables in the form header showing Total Hours, Total Dollars and a Report Date along with being available to send to print, but the subform shows #NAME?

in my subform fields still Select Case op Grp Lbr Srch.value Case 1 If op Grp Lbr Srch.value = 1 And bln Link = 1 Then 'Search on employee EOM str Field Name = "[EMPLOYEE_NME]" 'field from query str Field Value = cbo Emp 'combo box on main form str Domain = "qry Rpt Labor Search-EOM" 'query str Where = str Field Name & "=" & Chr(39) & str Field Value & Chr(39) With Forms!

If I select a value in the combobox and click a refresh button that has only the following line of code: it works fine, and the subforms requeries and refreshes displaying the appropriate records.For days now, I have searched this forum and several others, MSDN site, and numerous sites that Google brought up that looked promising; however, nothing that I have tried has yet worked. If qry Rpt Labor Search-EOM is a - that is, if qry Rpt Labor Search-EOM is the name of a stored query definition - you should be able to simply put the text string "qry Rpt Labor Search-EOM" in the Record Source property. :( Requirement: use query as subforms recordsource based on user's selections; return requested information in applicable subform and provide option for user to send to report for printing. On the main form I have an option group, two combo boxes, a textbox and my command button to perform the search. Visible = False End If Case 2 If op Grp Lbr Srch.value = 2 And bln Link = 1 Then 'Search on JO EOM str Field Name = "[JO]" str Field Value = cbo JON str Domain = "qry Rpt Labor Search-EOM" str Where = str Field Name & "=" & Chr(39) & str Field Value & Chr(39) With Forms! That should cause the sub-form to use the query and display the records it generates. I have tried using both the control name and the subform name. Complie Error Method or data member not found It is telling me that ". Sub_2 displays the details for the item chosen in sub_1, in a list. I find the problem, that is, the 'id' field is in the query, but it's not displayed on the subform, so maybe Access cannot use it.

vba subform recordsource not updating-27vba subform recordsource not updating-89vba subform recordsource not updating-86

For both subform, I use the continue form, and they are bounded to 2 querys, with one field in common, say 'id'. And when the filter is changed, Access does a requery automatically.