-
WSAlexya1
AskWoody LoungerThanks for the further explanation Charlotte… The problem is that I don’t see different outcomes depending on which event I put code in… I see exactly the same outcome… Can you give me an example of something where I would see the difference? … I mean, can you think of one time that you have chosen to use On Print rather than On Format, and why?
-
WSAlexya1
AskWoody LoungerWhen you open an FTP session and do the transfer… is there a login ID and password?… or are you going in as Anonymous?
-
WSAlexya1
AskWoody LoungerOkie dokie… I know you want to let it go for the night…
Tomorrow, I’d try using Trim() on both RCar and strCar in the SQL statement, just in case there’s a space in there or something… I’ve had that happen before….
The next thing I’d check is the syntax of the whole statement… I’d Debug.Print strSQL and check CAREFULLY that something’s not missing or inserted incorrectly… Sometimes it’s so obvious when I see it in the Debug Window…Have a good night…
-
WSAlexya1
AskWoody LoungerWait!! (I’m determined now…
)
What kind of data is in RCar… and strCar (the combo box)?
-
WSAlexya1
AskWoody LoungerHang in there Dave…
- I don’t know why it’s asking you for a parameter on “Rcar” but adding the table name is worth a try… Are you sure that is the correct spelling of the field name?
- As for the datatype mismatch, you need to change your update statement… You need to concatenate the “strCar” variable into the statement, not include it as a literal… Even if it were a literal value (although highly unlikely), you’d have to enclose “strCar” in quotes…
- Also, I added a semi-colon at the end of the statement… I think that would have been your next problem…
Try this…
strSQL = “UPDATE tblDetails SET [tblDetails].[Rcar] = ” & Chr(34) & strCar & Chr(34) & ” WHERE ” & strWhere & “;”
-
WSAlexya1
AskWoody LoungerGlad to know that I’m not the only one who’s not clear on this…
Access 2000 Help probably has something different, but I looked a little further into Access 97 Help and it says…
“By running a macro or an event procedure when the Format event occurs, you can use data in the current record to make changes to the report that affect page layout. For example, you can display or hide a congratulatory message next to a salesperson’s monthly sales total in a sales report, depending on the sales total. After the control is displayed or hidden, Microsoft Access formats the section by using the values of format properties, such as CanGrow, CanShrink, HideDuplicates, KeepTogether, and Visible.
For changes that don’t affect page layout or for event procedures or macros that should run only after the data on a page has been formatted, such as a macro that prints page totals, use the Print event for the report section.”
From the sounds of this, we should use the On Print event… It’ll work in both, but making a control visible or invisible doesn’t really change the layout of the section, does it?… I guess it depends on the size of the information in the control… If it were a large text control then the CanShrink/CanGrow would be needed, and therefore we should use the On Format event…. I think…
But that makes me wonder… IF we used the On Print event for this… and the control did contain a lot of data… would the section not grow to show all of the data? …I think that’s what it’s saying…
I’m going to have to play around and test this… It’ll drive me
until I know that I’ve got it…
-
WSAlexya1
AskWoody LoungerHi Stewart…
I was about to reply that they should put the code in the Detail – On Format event…
I’m just curious… I’ve never been quite clear as to when to use which event for reports… I have read the help information, and I know the format event happens before the print event… but do you have any specific situations where to use one over the other?
Drives me crazy when I don’t know the WHY of things…
Anyone? -
WSAlexya1
AskWoody LoungerHere you go Dave…
MsgBox “This Part ” & [cbocode] & ” Already Exists For This Estimate”, vbCritical, “Duplicate Part”
-
WSAlexya1
AskWoody LoungerHi Leesha…
Sure… I’ll attach the database for you…
One thing though… I took a second look at my report… The numbers didn’t look quite right to me, so I played again…Just to clarify… Here’s how I see it…
You are listing each invoice for each client…
The Total Invoice Balance Due is the total of each invoice, less what’s already been paid for that invoice…
The Total Amount Due is the total of all outstanding unpaid amounts for each client’s account…
The Total Outstanding Balance / Credit Due is the total outstanding unpaid amounts for the entire report…Am I assuming correctly?? …If so, look at the report named “Fixed rptBillingHistory2″…
The changes I described in my prior reply are shown in “Fixed rptBillingHistory”… The new one has a couple more changes and another new text box… Sorry for the confusion… I don’t know where my head was when I fixed it the first time… It’s been one of those days for me too…
HTH… Have a great evening!
-
WSAlexya1
AskWoody LoungerHi Leesha…
When I tried to open the report in Preview mode, I got an error saying that there was a data type mismatch somewhere in the SQL statement for the report… Since the query itself opened up without error, I figured the problem was somewhere in the calculated fields in the report design… Therefore, the first thing I did was remove the expressions for the two totals fields in question… The report then opened in Preview fine…
After that, I changed three things…
- changed the expression for Text104 (in LastName/BusinessName Footer) to “=Sum([InvoiceTotal]-[AmtAlloc])”
- created a new text box named “txtGrandTotal” in the same area (in LastName/BusinessName Footer)
- set the control source to “=[Text104]”
- changed the RunningSum property to “Over All”
- set the Visible property to False
- I then changed the control source for Text87 (in the Report Footer) to “=[txtGrandTotal]”
[/list]That fixed your sample report for me… Try that and let me know if it works for you…
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
WSAlexya1
-
WSAlexya1
AskWoody Lounger… I should have known you’d beat me to it!…
Have a great weekend Hans! -
WSAlexya1
AskWoody LoungerHi there…
I’m not sure if I am clear on what the serial number represents, but for this purpose I’m assuming that it is a number that refers to the location of the meter being read…
First of all, I have to give complete credit to Hans!
… He posted a response to someone a week or so ago that was along these lines… I had been trying to figure out how to do this comparing data from previous and current record stuff in one query, for sooooo long!… I always end up doing it programmatically, and all thanks to Hans
, I don’t have to do it anymore… I’ve been playing with his example and altering it for your situation (as I see it)… I hope it makes sense and gives you a start at least….
Have a great weekend!
Let me know…
-
WSAlexya1
AskWoody LoungerJuly 18, 2003 at 6:32 pm in reply to: Reports made with wizard print extremely faint? (97 SR2) #694814Hi Hans,
Have I told you lately how incredibly good you are?!?!
I just created a new report with the wizard and printed two pages… Really faint (as expected)……..
I went into the printer properties and verified that the Economode was not checked… I checked it, unchecked it and it printed fine!I also noticed that the settings said 300 dpi … I remembered seeing 600 dpi on the report that I’d created myself earlier, so I changed that as well…
I guess it’s just a bug after all??… Thanks a million for helping me figure it out…Have a great weekend!
-
WSAlexya1
AskWoody LoungerJuly 18, 2003 at 1:05 pm in reply to: Reports made with wizard print extremely faint? (97 SR2) #694715After I read “The Hobbit”… many, many moons ago… I was hooked!
-
WSAlexya1
AskWoody LoungerJuly 18, 2003 at 1:03 pm in reply to: Reports made with wizard print extremely faint? (97 SR2) #694714Good Morning Hans…
… Gotta love Gandalf!!!! …He could fix this!… Meanwhile, some black magic would be good here!
Seriously though… Thanks for the suggestion… I’ve checked into the Economode thing… There is a setting for that, however it’s not checked… The printer is “supposed” to be using high quality mode… ?
Oh well… I’ll just keep on plugging away as I have been… Not a big deal really….
Just made me go “hmmmmmmmmm”…