OasisUnknown
New Member
- Joined
- Oct 15, 2015
- Messages
- 46
Hello All,
I have an issue that I have read somewhat about through google searches but I cant seem to find the fix that I need.
So I have several tables that are all feeding into a master query (basically building a master view) for a report.
I have a personnel roster
A gains roster
and a loss roster
these three main tables all feed a query
The problem that I am having is load times on the reports it takes about 30ish seconds for the report to load which is not all that bad but I did not like it.
What I have tried to do that works well for the report is take that master query and I choose to run a make table query with it.
So now I have a table with all the fields that I need and all the data that I need which is awesome. I based my report on this table instead of the query and the load time for the report is now basically instant because it is not running the query each time it opens.
now the problem comes when I try to refresh the data on that table.
in my gains and loss queries I have a parameter
The issue comes on the append query (I basically manually ran a make table query to get the table and then changed that exact query to an append query.
now when I refresh the database I run these two lines of code.
Now through my testing this error occurs because of the parameter listed above.
Does anyone know why this is happening.
If I take out the parameter above then the append runs fine. With the parameter on the gains query it fails with the runtime error.
The only other thing I can think of to try is just do a manual insert sql command through vba but if I already have the query built I dont get why I cant just pass the data on the query to the table. I can do it manually through the toolbar just fine with no errors but when I run it through vba I get the error.
I have an issue that I have read somewhat about through google searches but I cant seem to find the fix that I need.
So I have several tables that are all feeding into a master query (basically building a master view) for a report.
I have a personnel roster
A gains roster
and a loss roster
these three main tables all feed a query
The problem that I am having is load times on the reports it takes about 30ish seconds for the report to load which is not all that bad but I did not like it.
What I have tried to do that works well for the report is take that master query and I choose to run a make table query with it.
So now I have a table with all the fields that I need and all the data that I need which is awesome. I based my report on this table instead of the query and the load time for the report is now basically instant because it is not running the query each time it opens.
now the problem comes when I try to refresh the data on that table.
in my gains and loss queries I have a parameter
Code:
<=Now()+[Forms]![frmMainMenu]![MasterProjectionsLimitCBox] 'This grabs a numeric value from the main menu form ie 120 and it limits a date projection based off todays date plus 120 days.
The issue comes on the append query (I basically manually ran a make table query to get the table and then changed that exact query to an append query.
now when I refresh the database I run these two lines of code.
Code:
CurrentDb.Execute "delete * from tblMasterMOSI_Enlisted", dbFailOnError 'runs fine no issues with this code. Just delete everything off the table.
Code:
CurrentDb.Execute "qryMOSIConsolidatedSummaryEnlisted", dbFailOnError 'produces runtime error 3061 too few parameters expected 1
Now through my testing this error occurs because of the parameter listed above.
Does anyone know why this is happening.
If I take out the parameter above then the append runs fine. With the parameter on the gains query it fails with the runtime error.
The only other thing I can think of to try is just do a manual insert sql command through vba but if I already have the query built I dont get why I cant just pass the data on the query to the table. I can do it manually through the toolbar just fine with no errors but when I run it through vba I get the error.