Some things you might consider:
Do you already have Crystal, or would you need to purchase it? If you already have it, then try both solutions. I think that you would find Access more suitable for some tasks and Crystal more suitable for other tasks. I think that you would also find that either...
Access 2000 has OpenArgs for forms, it is not available for use in reports until XP.
Perhaps consider a hidden text box on the form that opens the report, or a global variable.
-Gary
The controls on a tab control all belong to the same form, so you can reference them as if they were on the same page:
Me.lstListBox.RowSource = ""
-Gary
To elaborate on the comments of lespaul and cmmrfrds:
You generally will not see the speed of record retrieval improve much if you create queries based on tables that are LINKED to a SQL Server database from an Access front end.
However, oftentimes the retrieval rate will improve dramatically...
Are you using the DoCmd.OpenReport method? If so, you just need to set up a loop that iterates once for each community and prints a report using the Where parameter of the OpenReport method. Something like this:
Dim dbsCurr as DAO.Database
Dim rsCommunities as DAO.Recordset
Set dbsCurr =...
You will also need to wrap each OR "section" in parentheses:
If Not IsNull(Me.txtSrchSCity) Then
If sql <> " WHERE " Then
sql = sql & " And "
End If
ok = True
sql = sql & "([po_c1] LIKE '" & Me.txtSrchSCity & "' OR [po_c2] LIKE '" & Me.txtSrchSCity & "' OR [po_c3] LIKE...
You could place a text box on a form, and enter the date once in the text box. In all 5 querys, reference the text box in the criteria section of the date field:
Between [Forms]![YourFormName]![txtStartDate] And [Forms]![YourFormName]![txtEndDate]
-Gary
I imagine that part of the flickering may be due to the fact that you are always setting the color, regardless of whether it is already the color you want or not.
If you MUST use labels this way, perhaps consider testing for the color with an if statement:
if Me.lblHandheld.ForeColor <>...
If the record source for the report is a query, make sure ProdDate is selected in the query.
Ultimately, you need to make sure that ProdDate is available in the record set that serves as your report's record source, be it a table or a query. If you click View -> Field List from the report's...
To pass a date, you should surround it with pound signs instead of single quotes.
The fact that you are being prompted for ProdDate suggests that Access doesn't recognize it as a valid field name. Is this field on the report?
-Gary
Could you post exactly what you are trying to put in the Where condition?
Are you casting to int in order to ignore the time portion of the date/time field? I don't think that you need to do this, if you have a date/time field in Access and pass it only the date portion, Access is smart enough...
Is objAccess of type Access.Application? If so, and you are using:
objAccess.DoCmd.OpenReport
then you can use the WhereCondition parameter at the end of the OpenReport method:
Dim objAccess As New Access.Application
With objAccess
.OpenCurrentDatabase ("C:\db1.mdb")...
Are DateSent1 through 3 data type Date/Time? If so, try replacint the single quotes with pound signs:
DoCmd.OpenReport strDocName, acPreview, , "DateSent1= #" & strName & "# OR DateSent2= #" & strName & "# OR DateSent3= #" & strName & "#"
-Gary
You might consider using 2 subreports, one for size 36 on the left side and one for the rest on the right side. It is not a very elegant solution, but should provide the desired results.
-Gary
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.