If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
importing
The criteria line is in my query made by using the wizard from the table, I'm
clicking the command button in my form to print the report. I'm printing a report. "John W. Vinson" wrote: On Fri, 8 Feb 2008 11:06:00 -0800, Terry wrote: on the Criteria line I have [enterrecordnumber], but it still doesn't work. It prints all the records in form view not the record view and the parameter doesn't come up. Terry... please. Again... I CANNOT SEE YOUR COMPUTER. I don't know where you have the critera line - you haven't said. I don't know what you're clicking to print - you haven't said. I don't know even what it is you're printing - a Report (good)? the Form (bad idea)? - you haven't said. I would like to be able to help, but without more information I cannot. John W. Vinson [MVP] |
#12
|
|||
|
|||
importing
On Fri, 8 Feb 2008 11:58:02 -0800, Terry
wrote: The criteria line is in my query made by using the wizard from the table, I'm clicking the command button in my form to print the report. I'm printing a report. Please open the Query in design view. On the menu, choose View... SQL. Copy and paste the SQL code to a message here. Also open the form in design view. Click the command button and view its Properties. On the Events tab find the Click event; mouseclick the ... icon by it to open the VBA editor; copy and paste the code to a message here. John W. Vinson [MVP] |
#13
|
|||
|
|||
importing
Sorry I didn't get right back. Had a emergency. Here is the information you
asked for. Thanks for your help. SELECT SWTEST.ID FROM SWTEST WHERE (((SWTEST.ID)=[enter record number])); Option Compare Database Private Sub Command92_Click() On Error GoTo Err_Command92_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.PrintOut acSelection Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub "John W. Vinson" wrote: On Fri, 8 Feb 2008 11:58:02 -0800, Terry wrote: The criteria line is in my query made by using the wizard from the table, I'm clicking the command button in my form to print the report. I'm printing a report. Please open the Query in design view. On the menu, choose View... SQL. Copy and paste the SQL code to a message here. Also open the form in design view. Click the command button and view its Properties. On the Events tab find the Click event; mouseclick the ... icon by it to open the VBA editor; copy and paste the code to a message here. John W. Vinson [MVP] |
#14
|
|||
|
|||
importing
On Tue, 12 Feb 2008 13:18:02 -0800, Terry
wrote: Sorry I didn't get right back. Had a emergency. Here is the information you asked for. Thanks for your help. SELECT SWTEST.ID FROM SWTEST WHERE (((SWTEST.ID)=[enter record number])); This query will return the ID from your table - AND NOTHING ELSE. If you want the report to print any fields other than the ID, open this query in design view and add the fields that you want to see to the query grid. The SQL will be SELECT SWTEST.ID, SWTEST.thisfield, SWTEST.thatfield FROM SWTEST WHERE ... as above Use this stored query as the Recordsource property of your report. I suspect that currently the report is currently based on the entire table, not on the query. Option Compare Database Private Sub Command92_Click() On Error GoTo Err_Command92_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.PrintOut acSelection Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub UGLY old wizard code... don't know why this was never upgraded, but the wizard is using Access 95 syntax! Replace this with Private Sub Command92_Click() On Error GoTo Err_Command92_Click Dim strReport As String strReport = "EnterNameOfYourReportHere" DoCmd.OpenReport strReport, acViewPreview Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub You can use acViewNormal if you want the report to print immediately rather than opening in Preview mode. -- John W. Vinson [MVP] |
#15
|
|||
|
|||
importing
John,
I made the changes but it still doesn't as me for the record number. This is my query. SELECT SWTEST.[Record Number], SWTEST.[Sw Version:], SWTEST.[Tester:], SWTEST.[Reviewed:], SWTEST.[Date:], SWTEST.[Installation Runs OK], SWTEST.[Program comes up after install], SWTEST.[Main screen comes onto the display], SWTEST.[Setup selections are stored], SWTEST.[Setup selections to perform their functions], SWTEST.[Show ECG waves when selected], SWTEST.[Store ECGs when selected], SWTEST.[Gain settings], SWTEST.[Lead selections], SWTEST.[Sweep Speed display modes], SWTEST.[Algorithm selections (filters)], SWTEST.[Retrieve Data Selected], SWTEST.[Grid on/off], SWTEST.[Condense/non condensed displays], SWTEST.[ECG'S as Applicable], SWTEST.[Summary as applicable (Screen Test OK)], SWTEST.[Measurement cursors], SWTEST.[Demographics editing], SWTEST.[Batch/Telecom], SWTEST.[Batch list editing: adding, clearing, subtracting and listing fu], SWTEST.[Can check just files], SWTEST.[Database Deletions], SWTEST.[Menu and Button Coordination], SWTEST.[Mode changes (Retrieve to ECG, etc], SWTEST.Installed, SWTEST.[Proper Statement for any test ECG], SWTEST.[Misc:], SWTEST.[Read in OK], SWTEST.[Auto analysis of test mark R Waves], SWTEST.[Change Beat Code], SWTEST.[Delete Beat], SWTEST.[Special Test this rev], SWTEST.[Report Printing:], SWTEST.[Holter:], SWTEST.[Copy Drive to Drive], SWTEST.[Test Date:] FROM SWTEST WHERE (((SWTEST.[Record Number])=[enterrecordnumber])); The code is Private Sub Command92_Click() On Error GoTo Err_Command92_Click Dim strReport As String strReport = "STF Report" DoCmd.OpenReport strReport, acViewPreview Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub Did I put something in wrong. Thank you so much for your help. Terry "John W. Vinson" wrote: On Tue, 12 Feb 2008 13:18:02 -0800, Terry wrote: Sorry I didn't get right back. Had a emergency. Here is the information you asked for. Thanks for your help. SELECT SWTEST.ID FROM SWTEST WHERE (((SWTEST.ID)=[enter record number])); This query will return the ID from your table - AND NOTHING ELSE. If you want the report to print any fields other than the ID, open this query in design view and add the fields that you want to see to the query grid. The SQL will be SELECT SWTEST.ID, SWTEST.thisfield, SWTEST.thatfield FROM SWTEST WHERE ... as above Use this stored query as the Recordsource property of your report. I suspect that currently the report is currently based on the entire table, not on the query. Option Compare Database Private Sub Command92_Click() On Error GoTo Err_Command92_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.PrintOut acSelection Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub UGLY old wizard code... don't know why this was never upgraded, but the wizard is using Access 95 syntax! Replace this with Private Sub Command92_Click() On Error GoTo Err_Command92_Click Dim strReport As String strReport = "EnterNameOfYourReportHere" DoCmd.OpenReport strReport, acViewPreview Exit_Command92_Click: Exit Sub Err_Command92_Click: MsgBox Err.Description Resume Exit_Command92_Click End Sub You can use acViewNormal if you want the report to print immediately rather than opening in Preview mode. -- John W. Vinson [MVP] |
#16
|
|||
|
|||
importing
On Wed, 13 Feb 2008 12:37:02 -0800, Terry
wrote: I made the changes but it still doesn't as[k] me for the record number. What is the Recordsource property of the report? It sounds like you created the query but did not use it in the report. -- John W. Vinson [MVP] |
#17
|
|||
|
|||
importing
I created my report from the table of the form. I'm not sure what the record
source property is. How can I find out? "John W. Vinson" wrote: On Wed, 13 Feb 2008 12:37:02 -0800, Terry wrote: I made the changes but it still doesn't as[k] me for the record number. What is the Recordsource property of the report? It sounds like you created the query but did not use it in the report. -- John W. Vinson [MVP] |
#18
|
|||
|
|||
importing
On Wed, 13 Feb 2008 13:48:02 -0800, Terry
wrote: I created my report from the table of the form. I'm not sure what the record source property is. How can I find out? Open the Report in design view. View its Properties. Look at the first row on the Data tab. Change this from the name of the table to the name of your query and you will then be displaying the data in the query (what you do want) rather than all the records in the table (what you're now asking for). -- John W. Vinson [MVP] |
#19
|
|||
|
|||
importing
Thank you So Much. It works great!!!!! I really appreciate all the time you
took with me. Have a great day! Thank you again "John W. Vinson" wrote: On Wed, 13 Feb 2008 13:48:02 -0800, Terry wrote: I created my report from the table of the form. I'm not sure what the record source property is. How can I find out? Open the Report in design view. View its Properties. Look at the first row on the Data tab. Change this from the name of the table to the name of your query and you will then be displaying the data in the query (what you do want) rather than all the records in the table (what you're now asking for). -- John W. Vinson [MVP] |
|
Thread Tools | |
Display Modes | |
|
|