R
ravishankar
h
i am getting stuck while updating the data in the database table usin
a command button. the code is as follows and i am getting th
following error: " run time 2185: you cant reference a property o
method for a control unless the control has focus" and th
"query=......." line of the code gets highlighted in yellow
Private Sub Command10_Click(
Dim query As Strin
query = "select RESOURCEINFO from tbl_control where CONTROLNAME='"
Combo4.Text + "'
If (cn.State <> 1) The
cn.Open "dsn=ABC", "", "
End I
rs.Open query, cn, adOpenKeyset, adLockOptimisti
RESOURCEINFO.SetFocu
rs.Fields(0) = RESOURCEINF
rs.Updat
rs.Clos
Set rs = Nothin
cn.Clos
Set cn = Nothin
On Error GoTo Err_Command10_Clic
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord,
acMenuVer7
Exit_Command10_Click
Exit Su
Err_Command10_Click
MsgBox Err.Descriptio
Resume Exit_Command10_Clic
End Su
i am a beginner. any help would be really of great help
i am getting stuck while updating the data in the database table usin
a command button. the code is as follows and i am getting th
following error: " run time 2185: you cant reference a property o
method for a control unless the control has focus" and th
"query=......." line of the code gets highlighted in yellow
Private Sub Command10_Click(
Dim query As Strin
query = "select RESOURCEINFO from tbl_control where CONTROLNAME='"
Combo4.Text + "'
If (cn.State <> 1) The
cn.Open "dsn=ABC", "", "
End I
rs.Open query, cn, adOpenKeyset, adLockOptimisti
RESOURCEINFO.SetFocu
rs.Fields(0) = RESOURCEINF
rs.Updat
rs.Clos
Set rs = Nothin
cn.Clos
Set cn = Nothin
On Error GoTo Err_Command10_Clic
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord,
acMenuVer7
Exit_Command10_Click
Exit Su
Err_Command10_Click
MsgBox Err.Descriptio
Resume Exit_Command10_Clic
End Su
i am a beginner. any help would be really of great help