Two part question:
1)I am working on a Quality Control database to store test data on over 1700 different products. Right now I have a form designed that has a set of three tab controls so the end user could switch the three sets of test data subforms that are linked to the main product information, thus displaying just that products data.
I want to add a command button that opens up a report displaying the data information for the product displayed. I have yet to find out how i can do this without having a popup dialog asking me what Product ID I want. I want to be able to eliminate this step and go straight into the report with the currently displayed information.
2) Now once that is accomplished how do I have the report ONLY display and print the last 30 chronological entries by date...NOT the last 30 entered, and sort them in ascending order?
I think i am going gray over here trying to figure it out.
Currently this is the coding that i have:
Private Sub GoToDataCompReport_Click()
On Error GoTo Err_GoToCompReport_Click
DoCmd.OpenReport "rptDataComp", acPreview, , "[MixID]=[Forms]![frmDataComp]![MixID]"
Exit_GoToDataCompReport_Click:
Exit Sub
Err_GoToDataCompReport_Click:
MsgBox Err.Description
Resume Exit_GoToDataCompReport_Click
End Sub
1)I am working on a Quality Control database to store test data on over 1700 different products. Right now I have a form designed that has a set of three tab controls so the end user could switch the three sets of test data subforms that are linked to the main product information, thus displaying just that products data.
I want to add a command button that opens up a report displaying the data information for the product displayed. I have yet to find out how i can do this without having a popup dialog asking me what Product ID I want. I want to be able to eliminate this step and go straight into the report with the currently displayed information.
2) Now once that is accomplished how do I have the report ONLY display and print the last 30 chronological entries by date...NOT the last 30 entered, and sort them in ascending order?
I think i am going gray over here trying to figure it out.
Currently this is the coding that i have:
Private Sub GoToDataCompReport_Click()
On Error GoTo Err_GoToCompReport_Click
DoCmd.OpenReport "rptDataComp", acPreview, , "[MixID]=[Forms]![frmDataComp]![MixID]"
Exit_GoToDataCompReport_Click:
Exit Sub
Err_GoToDataCompReport_Click:
MsgBox Err.Description
Resume Exit_GoToDataCompReport_Click
End Sub