Thanks in advance for your help.
I have a form that I am using to enter a lot of info into couple different tables.
I am calling the function below and wanting to retreive the 'value' of field AMOUNT in TABLE; tblShipping.
txtCatalogModelNUmber is an unbound text box on the form that has the Catalog Model Number that the user will enter.
Public Function FindAmount()
Dim strsql As String
Dim strMyString As String
strMystr = Me.txtCatalogModelNumber
strsql = "Select Amount from tblShipping " & _
"Where CatalogModelNumber = " & Chr$(34) & strMystr & Chr$(34)
Debug.Print strsql
End Function
Select Amount from tblShipping Where CatalogModelNumber = "263"
The above statement is what is in the immediate window.
263 is what I entered on the form to start the search.
The questions that I have are;
1. Is this the correct way to do this?
2. How do I 'store' the value that is in the AMOUNT field to a text box on the form?
3.Also I need to be able to subtract another Quantity (on the form) from this AMOUNT and replace AMOUNT with that calculation.
Thanks for the help.