T
TimWillDoIt
Hello,
I've created some Access apps, but I've very new to Visual Basic Event
Procedures. I want to take the value of a table field and put it in a
Textbox on my form when an object on the form is clicked.
I'm sure the basic VB procedure is good, I just need the correct syntax.
Below is that section of my code. The line in question is right under the
MsgBox line. "txtLimitedAccCost(JobCond)" is the name of my Textbox on the
form named "frmJobCost8". The value I want to place in the Textbox is in the
field, "LimitedAccess" in table "tblJobCondCosts"
If I haven't totally confused everyone, can someone give me the correct
syntax to put that value in that Textbox? Thanks.
Private Sub chkLimitAcc_JobCond__Click()
On Error GoTo Err_chkLimitAcc_JobCond__Click
MsgBox "It Worked!", 1
frmJobCost8.txtLimitedAccCost(JobCond) = tblJobCondCosts.LimitedAccess
Exit_chkLimitAcc_JobCond__Click:
Exit Sub
Err_chkLimitAcc_JobCond__Click:
MsgBox Err.Description
Resume Exit_chkLimitAcc_JobCond__Click
End Sub
I've created some Access apps, but I've very new to Visual Basic Event
Procedures. I want to take the value of a table field and put it in a
Textbox on my form when an object on the form is clicked.
I'm sure the basic VB procedure is good, I just need the correct syntax.
Below is that section of my code. The line in question is right under the
MsgBox line. "txtLimitedAccCost(JobCond)" is the name of my Textbox on the
form named "frmJobCost8". The value I want to place in the Textbox is in the
field, "LimitedAccess" in table "tblJobCondCosts"
If I haven't totally confused everyone, can someone give me the correct
syntax to put that value in that Textbox? Thanks.
Private Sub chkLimitAcc_JobCond__Click()
On Error GoTo Err_chkLimitAcc_JobCond__Click
MsgBox "It Worked!", 1
frmJobCost8.txtLimitedAccCost(JobCond) = tblJobCondCosts.LimitedAccess
Exit_chkLimitAcc_JobCond__Click:
Exit Sub
Err_chkLimitAcc_JobCond__Click:
MsgBox Err.Description
Resume Exit_chkLimitAcc_JobCond__Click
End Sub