Vivirtruvian
Registered User.
- Local time
- Today, 13:07
- Joined
- Jun 20, 2017
- Messages
- 19
Hi all,
I've been staring at my screen for hours trying to find a similar situation/solution to the issue I am facing, which has two criteria:
1. Form will be editing existing fields in a table that are blank (not creating new lines of data)
2. Form needs the fields to remain pre-filled with the same data until the form is closed and re-opened.
As a complete novice, I have managed to achieve one or the other, but cannot get a simple solution to both :banghead:
Context:
tblProtein: contains information of stock entering the warehouse which has the following fields:
- Date In
- Dkt No
- Material No
- Description
- SSCC ** (ie. pallet number)
- Batch Code
- Site *
- Section *
- Row*
- P *
* denotes that data for this field is currently empty
** denotes that this is the parameter for which I need to edit the Site/Section/Row/P data for
I have a form (frmPutaway) that allows me to search for a pallet by SSCC and bring up fields to edit each of the respective Site/Section/Row/P fields.
However, I need this form to function so that an operator enters Site/Section/Row information once, and these values are carried over when the next SSCC is called up. I have done this using the following:
I have txtP as a bound text box, because this will be an individual value for each line; the other text boxes I wish to type once to insert in bulk.
How can I get these fields to function as per the above code, but also send these fields to the respective fields in tblProtein in relation to the SSCC number I have called up?
Help is always appreciated
I've been staring at my screen for hours trying to find a similar situation/solution to the issue I am facing, which has two criteria:
1. Form will be editing existing fields in a table that are blank (not creating new lines of data)
2. Form needs the fields to remain pre-filled with the same data until the form is closed and re-opened.
As a complete novice, I have managed to achieve one or the other, but cannot get a simple solution to both :banghead:
Context:
tblProtein: contains information of stock entering the warehouse which has the following fields:
- Date In
- Dkt No
- Material No
- Description
- SSCC ** (ie. pallet number)
- Batch Code
- Site *
- Section *
- Row*
- P *
* denotes that data for this field is currently empty
** denotes that this is the parameter for which I need to edit the Site/Section/Row/P data for
I have a form (frmPutaway) that allows me to search for a pallet by SSCC and bring up fields to edit each of the respective Site/Section/Row/P fields.
Code:
Private Sub txtGoTo_AfterUpdate()
If (txtGoTo & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[SSCC]=""" & txtGoTo & """"
If rs.NoMatch Then
MsgBox "Sorry, no such record '" & txtGoTo & "' was found.", _
vbOKOnly + vbInformation
Else
Me.Recordset.Bookmark = rs.Bookmark
End If
rs.Close
txtGoTo = Null
End Sub
However, I need this form to function so that an operator enters Site/Section/Row information once, and these values are carried over when the next SSCC is called up. I have done this using the following:
Code:
Private Sub txtRow_AfterUpdate()
Me.txtRow.DefaultValue = """" & Me.txtRow.Value & """"
End Sub
Private Sub txtSection_AfterUpdate()
Me.txtSection.DefaultValue = """" & Me.txtSection.Value & """"
End Sub
Private Sub txtSite_AfterUpdate()
Me.txtSite.DefaultValue = """" & Me.txtSite.Value & """"
I have txtP as a bound text box, because this will be an individual value for each line; the other text boxes I wish to type once to insert in bulk.
How can I get these fields to function as per the above code, but also send these fields to the respective fields in tblProtein in relation to the SSCC number I have called up?
Help is always appreciated

Last edited: