Lilfiger19
New member
- Local time
- Yesterday, 22:31
- Joined
- Mar 16, 2015
- Messages
- 6
Hi,
I have a combo box that has a list of names in it. When I select a name, I am wanting to DSum a column in one of my tables based off of the name in the combobox and pass the value to a specific text box. The below code has worked in another database that I have set up but it is for 2010. i am currently writing this one in 2007. Can anyone please help me understand what I am doing wrong?
I have a combo box that has a list of names in it. When I select a name, I am wanting to DSum a column in one of my tables based off of the name in the combobox and pass the value to a specific text box. The below code has worked in another database that I have set up but it is for 2010. i am currently writing this one in 2007. Can anyone please help me understand what I am doing wrong?
Code:
Private Sub cbxTM_AfterUpdate()
Me.txtCases = DSum("([Cases LY Var])", "tbl_Productivity", "[TM_and_ID]= '" & Nz([cbxTM]")
End Sub