F
Freddy
I have a simple Access database for tracking the location of 'books'
within an office. I would like to use a form to allow people to check
the books in and out and enable others to see where the books are
(Checked In to the 'library' or checked Out to a User). The form has: a
combo-box to list all of the books in the library, an unbound textbox
with a network user name function and control buttons for 'Check In'
and 'Check Out'. The problem is I don't know how to write the code for
the control buttons that will change the values (In/Out, username and
date) of the record selected in the combo-box.
I have the following code in the "OnClick" event of the 'Check In'
button:
Public Sub Inbtn_Click()
'get variables for Code, Date and User
Forms![tu tracking form]!Code.SetFocus
Let strCode = Forms![tu tracking form]!Code.Text
Forms![tu tracking form]!Date.SetFocus
Let strDate = Forms![tu tracking form]!Date.Text
Forms![tu tracking form]!User.SetFocus
Let strUser = Forms![tu tracking form]!User.Text
' Row in combo-box/table
Let strindex = Forms![tu tracking form]!Product.ListIndex
Let strRowNo = strindex + 1
.... and this is where I'm lost. I don't know how to to write the
values for the variables to the table. To use an Excel analogy, how do
you reference a specific "cell" (row (strRowNo) / field (User, Date,
In/Out) in the table?
I'm standing on the edge and I just need a little push (I think). Help
please.
Thanx,
Geoff
within an office. I would like to use a form to allow people to check
the books in and out and enable others to see where the books are
(Checked In to the 'library' or checked Out to a User). The form has: a
combo-box to list all of the books in the library, an unbound textbox
with a network user name function and control buttons for 'Check In'
and 'Check Out'. The problem is I don't know how to write the code for
the control buttons that will change the values (In/Out, username and
date) of the record selected in the combo-box.
I have the following code in the "OnClick" event of the 'Check In'
button:
Public Sub Inbtn_Click()
'get variables for Code, Date and User
Forms![tu tracking form]!Code.SetFocus
Let strCode = Forms![tu tracking form]!Code.Text
Forms![tu tracking form]!Date.SetFocus
Let strDate = Forms![tu tracking form]!Date.Text
Forms![tu tracking form]!User.SetFocus
Let strUser = Forms![tu tracking form]!User.Text
' Row in combo-box/table
Let strindex = Forms![tu tracking form]!Product.ListIndex
Let strRowNo = strindex + 1
.... and this is where I'm lost. I don't know how to to write the
values for the variables to the table. To use an Excel analogy, how do
you reference a specific "cell" (row (strRowNo) / field (User, Date,
In/Out) in the table?
I'm standing on the edge and I just need a little push (I think). Help
please.
Thanx,
Geoff