Why not check inside your function to see if the paramter is null - if so return an empty string (or whatever). The text box on the report then has its control source set to your function as normal?
Thanks for the quick reply, Sam.
I'm not sure I can use the idea, elegant as it is. I have my table organised with fieldnames NetIncome, CostOfRevenue, ResearchDevelopment plus about 12 more, so I think I break the limits for a crosstab query.
I'm sure there must be an easy way to do this..
I would like a report to list company financial information for the past few quarters (haven't decided yet, probably 4 or 5).
I would like the structure below
June 05 Mar 05 Dec 04
Net Income...
Actually Rich has a point. If you're just placing the result of the lookup into the control ReleaseDescrip, there's no need for VB
Since Release_Type and Base are both text values you should use
Me.ReleaseDescrip = DLookup("[Release_Description]", "tblReleases", "[Release_type] = '" &...
It's been a long time since I've had to do anything like that (and it wasn't in VBA anyway). It is done, though, for VBA control of printers in Access. Google for DEVMODE or DEVNAMES or prtDevMode.
I think basically the technique is to define a type the mirrors the binary structure that you...
1. You need to create a query which contains all the data you need for the permit across the 3 tables.
2. Make a report which is based on that query. Design the report to look like the permit(s) you wish to print off containing the fields from the query
Hi
This should do it:
On Error GoTo ErrorHandler
Dim Msg, Style, Title
Dim gstrReportName As String
Dim gstrWhere As String
Select Case Forms![frmReports]![GrpReportType]
Case 1
gstrReportName = "rptExclusions"
Case 2
gstrReportName = "rptObjections"
Case 3
gstrReportName =...
That's correct.
I think I'm going to need see the whole code. txtFromChoose seems to be evaluated correctly. In the meantime, its worth you doublechecking to see that GrpReportDate does, indeed, equal 2 at that line.
The rest of your logic in your post with regard to gstrWhere looks sound to...
I'm taking a bit of a stab at this (hope you don't mind!)
xlApp is declared as a global, but it appears to be quit'ed in
xlapp.Quit 'Quit Excel
which seems to be inconsistent.
I would consider making xlApp a local variable and would...
Now that's a bit strange. Isnull should certainly work and tested it just now, if there is no data entered into that field.
Have you tried setting a breakpoint in VB at your "isnull (Me.txtFromChoose.Value )" line and checking the value of txtFromChoose.Value?