473,320 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Setting recordsource of a report using openarg

374 256MB
I use a modified version of the Allen Browne filter script to select records from a query.

The code concludes with the following statement to create the SQL to select the correct records:

Expand|Select|Wrap|Line Numbers
  1. Me.subfrmlogforfiltering.Form.RecordSource = "Select " & topinsert & " * FROM logforfiltering WHERE " & strWhere
I am then trying to pass this through a print button as openargs so the records shown load up in the report:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "rptlogforfiltering", acViewPreview, OpenArgs:=Me.subfrmlogforfiltering.Form.RecordSource
Then in the report I have:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2. Me.RecordSource = Me.OpenArgs
  3. End Sub
However the form is just opening with an empty record. Can anyone see anything missing here? I have used a debug.print to show what is being sent in the open args and all seems correct. I have also checked the recordsource and this is showing the correct sql also but no records being shown...

Expand|Select|Wrap|Line Numbers
  1. Openargs print: Select All * FROM logforfiltering WHERE (([NCStatus] = 'Initial Notification'))
  2. Recordsource print: Select All * FROM logforfiltering WHERE (([NCStatus] = 'Initial Notification'))
Jul 18 '10 #1

✓ answered by munkee

fixed!

for some reason the report had the filter as (false). Therefore stopping any records being displayed. Deleting this out did the trick.

1 4566
munkee
374 256MB
fixed!

for some reason the report had the filter as (false). Therefore stopping any records being displayed. Deleting this out did the trick.
Jul 18 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Baker | last post by:
Hi: I need some help writing code that will "print" a report using Cute FTP. Specifically, I need to set up a "Button" which, when clicked, will: a. Create an FTP "Print" file of the...
0
by: ajaac | last post by:
What am I doing wrong? Is there a better way? I created a report using a table, and this works OK. But I would like to be able to use a dataset for this report. I will populate the dataset...
2
by: Hellotalktome13 | last post by:
Using a simple ASP.net page with a crystal report on it. Loading from IIS using Integrated Secruity in the reports connection string it populates the report in the browser. What User ID and...
0
by: =?Utf-8?B?QWJieQ==?= | last post by:
Can ne1 tell me what is the best way to handle barcode fonts in crystal report? I installed IDAutomationHC39M barcode font on my machine and used it in the report. when i used it it shows me the...
6
by: Peter Herath | last post by:
I want to create a dynamic report using a crosstab query...... pls someone look into my attached example database and help me out to do the report generation.... example is like dis...: there...
1
by: Peter Herath | last post by:
I have created a report using sample codes taken by the forum. one problem is that the report displays the field/column names in the table in columnar format(field names display in rows.) but i want...
4
by: Karl | last post by:
How do you set the width of a control in the detail section of a report using the On Format event for the detail section?
0
by: amiga500 | last post by:
Hello, I am developing a crystal report called Expense Report (I am not an expert Crystal Report designer) if someone could help me in this problem I would be greatly appreciate it. The report...
0
by: balurajeev | last post by:
Hi friends , I want to create a Crystal report in C# using Parameterised Storred Procedure This is my Stored Procedure ALTER proc . ( @fname varchar(50), @lname varchar(50),
0
by: SLauren | last post by:
Hi, I am new to crystal report. Can anyone please suggest how can i generate a crystal report using dataset without a report object? I have a crystal report (.rpt) with a mapped dataset. How can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.