hardhitter06
Registered User.
- Local time
- Today, 03:52
- Joined
- Dec 21, 2006
- Messages
- 600
Hi,
I've attached two photos to make this explination a bit easier.
On my main form (when the database opens) allows the user to search by Fed ID using a textbox and a button with code which will return all records that match that FED ID and fall within a year from Today's date.
Photo 1 shows the results of Fed ID XXXX49175. These 4 records fall within a year from Today's date under that Fed ID. Also notice that some of the UNSPSC codes are different.
My goal/plan is to be able to click the "More UNSPSC Info" button which will return all records that match the previously searched FED ID along with the UNSPSC number within that line.
For example, under the 3/20/12 record, if I clicked "More UNSPSC Info", a second form (Photo 2) will return two records matching that Fed ID and UNSPSC number. If I clicked Record 2 or 3 from Photo one, only one record would be returned.
Here is the code for my button but I need help using the stLinkCriteria I believe.
Thank you for your help.
I've attached two photos to make this explination a bit easier.
On my main form (when the database opens) allows the user to search by Fed ID using a textbox and a button with code which will return all records that match that FED ID and fall within a year from Today's date.
Photo 1 shows the results of Fed ID XXXX49175. These 4 records fall within a year from Today's date under that Fed ID. Also notice that some of the UNSPSC codes are different.
My goal/plan is to be able to click the "More UNSPSC Info" button which will return all records that match the previously searched FED ID along with the UNSPSC number within that line.
For example, under the 3/20/12 record, if I clicked "More UNSPSC Info", a second form (Photo 2) will return two records matching that Fed ID and UNSPSC number. If I clicked Record 2 or 3 from Photo one, only one record would be returned.
Here is the code for my button but I need help using the stLinkCriteria I believe.
Code:
Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSplitOrderingSearchAdvance"
strIdNumber = Me.UNSPSC
stLinkCriteria = "[UNSPSC]"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command30_Click:
Exit Sub
Err_Command30_Click:
MsgBox Err.Description
Resume Exit_Command30_Click
End Sub
Thank you for your help.