M
Mark
I have a project that holds Assets. In one table I have asset info , one to hold info that shows same assets but if they are on loan. The form Loan, has lookup field for the ID_asset in Asset table plus info of loaner dates etc. I use a command button to print a loan form that prints only that record. The Loan table has ID_Asset_1 to ID_Asset_20 , date From and TO, the Employee
In the Command button, how can I locate the Asset in Asset table and update the ON_Loan (yes/no) and some other field in the Asset Table
The tables are not linked.
I'm Fairly new to Access and I prefer hard coding than the query wizard etc..
Here is my prob area
=========
Private Sub Command141_Click(
On Error GoTo Err_Command141_Clic
Dim stDocName As Strin
Dim strFilter As Strin
' Just to make sure the selection on the form is update
Me.Refres
' get ready to print the for
stDocName = "KITassembly
' set my filter to the actual recor
strFilter = "Kit = Forms!KITassembly!Kit
' Testing if I can find the proper ID_Asset just the the fun of i
If DLookup("[ID_Asset]", "[AudioVideo]", "[ID_Asset]=Me![ID_Asset_1] ") Is Not Null The
AudioVideo.[On_Loan] = Me![On_Loan
End I
' the line above works fine ok! next, do the Asset table update
****Now HERE is the prob : How can I update the Asset table to show that ID_Asset_1 is on loan and update the field On_loan in the Asset Table
Thanks for any help !
In the Command button, how can I locate the Asset in Asset table and update the ON_Loan (yes/no) and some other field in the Asset Table
The tables are not linked.
I'm Fairly new to Access and I prefer hard coding than the query wizard etc..
Here is my prob area
=========
Private Sub Command141_Click(
On Error GoTo Err_Command141_Clic
Dim stDocName As Strin
Dim strFilter As Strin
' Just to make sure the selection on the form is update
Me.Refres
' get ready to print the for
stDocName = "KITassembly
' set my filter to the actual recor
strFilter = "Kit = Forms!KITassembly!Kit
' Testing if I can find the proper ID_Asset just the the fun of i
If DLookup("[ID_Asset]", "[AudioVideo]", "[ID_Asset]=Me![ID_Asset_1] ") Is Not Null The
AudioVideo.[On_Loan] = Me![On_Loan
End I
' the line above works fine ok! next, do the Asset table update
****Now HERE is the prob : How can I update the Asset table to show that ID_Asset_1 is on loan and update the field On_loan in the Asset Table
Thanks for any help !