Try using the function DMax. You can look it up in help for a better description of the syntax. It should look like this.
dtRank = DMax("MaxOfShoo tDate", "PB5")
User Profile
Collapse
-
The answer is yes it does create problems. There has to be an error handle in the function CCS_Run to catch the event that the report has been cancelled.Leave a comment:
-
Just to clarify..
The switch board runs prompts the function CCS_Run
That function loads the the report which has an open eventCode:Function CCS_Run() DoCmd.OpenReport "Cost Code Stats", acViewPreview End Function
...Code:Private Sub Report_Open(Cancel As Integer) DoCmd.OpenForm "CostCodeFilter", , , , acFormAdd, 3 'Cost code filter will load a form that allows
Leave a comment:
-
Marc Brown started a topic How do you prevent access from showing error dialog box (Runtime error 2501).in AccessHow do you prevent access from showing error dialog box (Runtime error 2501).
I keep on getting the same error message and I don't know how to either solve the problem or prevent it from showing the error. I have set up a switchboard item that opens a report. When the report opens it will call a form so that the user can change parameters in the report and filter the information before the report is generated see below.
...Code:Private Sub Report_Open(Cancel As Integer) DoCmd.OpenForm "CostCodeFilter",
-
Working with SQL Servers From Access VBA
I am just starting to work with a connection between SQL Servers and Access using vba. I was wondering if anyone knows of some good sites that show the basic functionality as well as how to connect and set up recordsets from the SQL server.
Thanks for the help. -
Great idea, but that does not work in this case because the report must be initiallized in order to reference the controls which are being change.
I did find a messy solution where I put a textbox on the report itself that is used as a check if the filter ran.Leave a comment:
-
VBA Return a Value from Docmd.OpenForm to a Report
I have a report that when it opens it will propt DoCmd.OpenForm which will open a form that will filter the results of the report. The problem is that if you close the form without initializing the filter it will return an error because the report fields will not be defined.
What I would like to do is on a Form_Close event return a variable to the Report_Open event which will cancel the creation of the report.
Any i... -
The control has the same name as the report so CCSubCost_Subre port.Leave a comment:
-
I would guess it's how you are sending over the variable rs. Try taking it out of the quotations so it would look like this.
Code:DoCmd.OpenReport "I# Report", acViewNormal, , "[Carrier Report].[I#]=" & chr(34) & rs & chr(34)
Leave a comment:
-
How do you set a variables for controls in a subreport?
I am trying to run a report which displays the data horizontally across the page to make the report more readable. I managed to do this by having a list of empty fields and assign the control source based on a filter which is prompt by a open event. The code is as follows where jobs(1,i) is a list of the jobs:
...Code:Set Cnt = Reports![Job Subtrade Analysis].Controls For i = 0 To 6 If i <= -
Try using..
The nz() function creates a replacement value if the object is null so the reason it is working is that me.combobox is null so it replaces the value with "" = "" which returns true. Anouther way of doing is this isCode:If IsNull(me.combobox_name) then msgbox "You must have to choose value" End If
Code:If nz(me.combobox_name,"") = "" then
Leave a comment:
-
Show Report Details Horizontally (Access 2007)
I have a report which I would like to show the details horizontally instead of vertically. The report should look something like this:
Field1 Data11 Data12 Data13 ...
Field2 Data21 Data22 Data23 ...
Field3 Data31 Data32 Data33 ...
Field4 Data41 Data42 Data43 ...
I thought of a couple of options to do this but are not working out. Using Crosstab query in a sub report displays the... -
I found the answer, you can change the level of the title line by right clicking and clicking on Layout>Move up/Move down.
Thanks.Leave a comment:
-
How to set the table titles on different header lines in Access Reports?
I have a report created in MS Access 2007 and I need to change the title line of report from the page header to a group header. Is there an easy way to do this with out recreating the report through a report wizard? -
On my navigation pane I have the form available to enter the records and a list of standard reports generated from the records, but there is no direct link between the form and the report.Leave a comment:
-
Marc Brown started a topic Is it possible to create a dropdown filter for reports generated in Access?in AccessIs it possible to create a dropdown filter for reports generated in Access?
I am creating a report which refences two table. One lists activity types and descriptions, the other lists the historical productivities in those activities. The problem is there are hundreds of activities and I would like users the option easily filter the activities. The effect that I am looking for would very simmilar to the filters on Pivot Tables.
No activity results to display
Show More
Leave a comment: