D
Deanna
Hi,
I need some help with the code below. It is the same working code in Access
97 and 2003, but it is not working in Access 2007. There is no error. The
problem is txtbox1 is not getting the value in Me!lstDat.Column(2). When I
debug, the Me!lstDat.Column(2) has the correct value, but txtbox1 is null.
Any suggestion will be helpful! We are converting to Access 2007 in 2 weeks.
Thanks!
Deanna
Private Sub lstDat_Click()
On Error GoTo lstDat_Click_Err_Handler
DoCmd.Hourglass True
Forms!frmAddDepartments!lbl1.Caption = "Category"
Forms!frmAddDepartments!lbl1.Visible = True
Forms!frmAddDepartments!txtBox1.Visible = True
Forms!frmAddDepartments!txtBox1.SetFocus
'Forms!frmAddDepartments!txtBox1 = Me!lstDat.Column(5)
Forms!frmAddDepartments!txtBox1 = Me!lstDat.Column(2)
Forms!frmAddDepartments!txtSubDepartment = Me!lstDat.Column(1)
Me.txtBox1.Value = Me!lstDat.Column(2)
Forms!frmAddDepartments!cmdAddM.Enabled = True
DoCmd.Hourglass False
Exit Sub
lstDat_Click_Err_Handler:
DoCmd.Hourglass False
MsgBox "An error has occurred in lstDat_Click section of
frmAddDepartments. " & Err.Description
Exit Sub
End Sub
I need some help with the code below. It is the same working code in Access
97 and 2003, but it is not working in Access 2007. There is no error. The
problem is txtbox1 is not getting the value in Me!lstDat.Column(2). When I
debug, the Me!lstDat.Column(2) has the correct value, but txtbox1 is null.
Any suggestion will be helpful! We are converting to Access 2007 in 2 weeks.
Thanks!
Deanna
Private Sub lstDat_Click()
On Error GoTo lstDat_Click_Err_Handler
DoCmd.Hourglass True
Forms!frmAddDepartments!lbl1.Caption = "Category"
Forms!frmAddDepartments!lbl1.Visible = True
Forms!frmAddDepartments!txtBox1.Visible = True
Forms!frmAddDepartments!txtBox1.SetFocus
'Forms!frmAddDepartments!txtBox1 = Me!lstDat.Column(5)
Forms!frmAddDepartments!txtBox1 = Me!lstDat.Column(2)
Forms!frmAddDepartments!txtSubDepartment = Me!lstDat.Column(1)
Me.txtBox1.Value = Me!lstDat.Column(2)
Forms!frmAddDepartments!cmdAddM.Enabled = True
DoCmd.Hourglass False
Exit Sub
lstDat_Click_Err_Handler:
DoCmd.Hourglass False
MsgBox "An error has occurred in lstDat_Click section of
frmAddDepartments. " & Err.Description
Exit Sub
End Sub