Access Keeps Crashing when I go click Debug (1 Viewer)

GoodyGoody

Registered User.
Local time
Today, 23:16
Joined
Aug 31, 2019
Messages
120
Hi, I have just been working on Crosstab queries and reports with parameters and have got it all working (or so I thought). I am now getting an error on the Querydef function where I am setting up the parameters of the query in VBA before calling the report. I have no idea why this isn't now working but for some reason Access just closes on me now with no error or anything. It just shuts down. I have Compacted and Repaired the DB several times. I've compiled the DB again but all to no avail. Does anyone have any suggestions as to how I can find out why it is just closing when I go to view the VBA code for this particular VBA function?

Thanks
Stephen
 

theDBguy

I’m here to help
Staff member
Local time
Today, 16:16
Joined
Oct 29, 2018
Messages
21,358
Hi Stephen. Sounds like you've already done what's expected. Have you stepped through the code to trace the problem. If that doesn't help, my next advice is to go back to a previous version of your db and then slowly try to add the new features again - just in case it got corrupted.
 

GoodyGoody

Registered User.
Local time
Today, 23:16
Joined
Aug 31, 2019
Messages
120
Thanks DBGuy. Yes, luckily I had a backup. :) All good again. Just need to pass a parameter to the report to tell me how many columns to check which I think is the simplest way as I already have the data from the VBA which calls the report. Thanks again for the support.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 16:16
Joined
Oct 29, 2018
Messages
21,358
Thanks DBGuy. Yes, luckily I had a backup. :) All good again. Just need to pass a parameter to the report to tell me how many columns to check which I think is the simplest way as I already have the data from the VBA which calls the report. Thanks again for the support.
Hi. Glad to hear you got it sorted out. Are you talking about trying to count the columns of a crosstab query?
 

GoodyGoody

Registered User.
Local time
Today, 23:16
Joined
Aug 31, 2019
Messages
120
Thanks. Yes but in the report itself, I need to know that all columns that should have data have data. I can just pass the parameter through to the report form the VBA unless there is a similar count columns method for a report?
 

isladogs

MVP / VIP
Local time
Today, 23:16
Joined
Jan 14, 2017
Messages
18,186
Agree with MajP regarding decompiling to remove any corrupted compile code.

As for your other point, I think a different approach should be used. See my answer in your other thread
 

Users who are viewing this thread

Top Bottom