Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Additions at once

Status
Not open for further replies.

DarkOne72

Technical User
Jun 14, 2002
210
US
Hi All,

I have a question about a form I am developing. What I need for it to do is allow me to type in text in a field for "Model" and I have another field "Location" set to default value of Warehouse ; and for the last box allowing me to add multiple serial numbers with the other 2 boxes values.
Example would be :
Typing in "A400" in Model Box
"Warehouse" for default value of next box
And scanning 7 items with different serial numbers and adding it directly to the inventory table each scan with those criteria set in place.
Any ideas?


What I tried and isn't working is (and not exactly as mention above)
I set the Location default value to "Warehouse"
Set a Tag of "CarryForward" in the Model box and used the following code (which keeps giving me errors) to After_Update

Private Sub Box_Type_AfterUpdate()
Dim ctl As Control
On Error GoTo Box_Type_AfterUpdate_Err

'Set the new records default values to the previous records values
For Each ctl In Me.Controls
'any records needing a previous value set the tag name to "Carryforward"
If ctl.Tag = "CarryForward" Then
ctl.DefaultValue = """" & ctl.Value & """"
End If
Next ctl
Box_Type_AfterUpdate_Exit:
Set ctl = Nothing
Exit Sub
Box_Type_AfterUpdate_Err:
'Alert the user that an error has occurred
Call ErrorHandler(Err.Number, Err.Description, "Box_Type_AfterUpdate")

Resume Box_Type_AfterUpdate_Exit
End Sub

...and i didn't get anywhere after that but I was going to make it to where after update of serial number it would goto next record after scan.

Thanks in adavance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top