Behind a combo box on an open form, I have the below code to run a query, which it does, and pops up the query results.. MaxofID, NPPricePerWeek and IDProperty2, in data sheet view.
I would like to have the query run in the background and not pop up as a datasheet, and then.
I would like to get the results back onto the form for calculations.
Can someone please point me in the right direction, I'm not sure what to do next
and my VBA skills are almost zero.
Expand|Select|Wrap|Line Numbers
- Private Sub CboProperty_AfterUpdate()
- On Error GoTo Err_CboProperty_AfterUpdate
- Dim stDocName As String
- stDocName = "tblRRNewPropertyPrice3"
- DoCmd.OpenQuery stDocName, acNormal, acEdit
- Exit_CboProperty_AfterUpdate:
- Exit Sub
- Err_CboProperty_AfterUpdate:
- MsgBox Err.Description
- Resume Exit_CboProperty_AfterUpdate
- End Sub