Thanks Rural Guy for your helpful answer and am in the process of doing just that
Now I have a small problem with another form which I want to use as an Inventory Adjustment form. The form has a main form and a subform.The main form takes the the adjustment date and the memo. The subform lists all the products and the quantity in stock plus the new quantity.
These forms are unbound and am using a select statement and recordset to populate the subform on load. The problem is the new stock text box is unbound and when I try to populate it whatever I insert is repeated all over .
The code am using to populate the subform on load is
Private Sub Form_Load()
' pick the the value id
'open recordset of the products table
Dim rs As Recordset 'Rs is products table
Dim db As Database
Set db = CurrentDb
'Dim fld As Field
Set rs = db.OpenRecordset("Select * from Products")
'set forms data source
Set Me.Form.Recordset = rs
'populate controls
With rs
ProductID = .Fields("ProductID")
QtyInStock = .Fields("QtyInStock")
End With
End Sub
I have tried the following method to bind the new quantity value so thats its bound but its not working
Dim fld as Field
Set fld = New Field
rs.Fields.Append "NewQty", adBigInt
txtPhysicalCount = .Fields("NewQty")
Any idea or sample of how this works
All I want the user to do is open the main form and then the subform is populated with data from products table all they have to do is just check the qty in stock against their count if any change correct it using the new qty and then enter date and reason for adjustment and then save.
All help appreciated.
Now I have a small problem with another form which I want to use as an Inventory Adjustment form. The form has a main form and a subform.The main form takes the the adjustment date and the memo. The subform lists all the products and the quantity in stock plus the new quantity.
These forms are unbound and am using a select statement and recordset to populate the subform on load. The problem is the new stock text box is unbound and when I try to populate it whatever I insert is repeated all over .
The code am using to populate the subform on load is
Private Sub Form_Load()
' pick the the value id
'open recordset of the products table
Dim rs As Recordset 'Rs is products table
Dim db As Database
Set db = CurrentDb
'Dim fld As Field
Set rs = db.OpenRecordset("Select * from Products")
'set forms data source
Set Me.Form.Recordset = rs
'populate controls
With rs
ProductID = .Fields("ProductID")
QtyInStock = .Fields("QtyInStock")
End With
End Sub
I have tried the following method to bind the new quantity value so thats its bound but its not working
Dim fld as Field
Set fld = New Field
rs.Fields.Append "NewQty", adBigInt
txtPhysicalCount = .Fields("NewQty")
Any idea or sample of how this works
All I want the user to do is open the main form and then the subform is populated with data from products table all they have to do is just check the qty in stock against their count if any change correct it using the new qty and then enter date and reason for adjustment and then save.
All help appreciated.