Open form with data

coyote

Registered User.
Local time
Today, 11:03
Joined
Oct 8, 2007
Messages
149
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.
 
Why do you feel the need to use an unbound form?
 
The problem is the new stock text box is unbound and when I try to populate it whatever I insert is repeated all over.

Did you resolve this issue?

I'm trying to do something similar that is a Multiple Item form that shows the results of a query on the form. I then placed a text box beside it on the form and when the form populates it of course ads the text box beside each record.

As your problem was when I enter a value in one of them it of course populates all of them with the same value which I only want it to populate that value. Once my user fills in the values I want them to be able to click "SAVE" and it would add the Inventory Level and the Actual Inventory level in a table that they entered so I can see the difference in a trend.

Any help would be appreciatted..
 

Users who are viewing this thread

Back
Top Bottom