Will see if I can get something uploaded today.
Thanks for continuing to offer assistance, really appreciated.
User Profile
Collapse
-
I've not tried to indirectly call, will give that a go now.
The code generates an insurance premium. Although the same table of risk information is used to generate a premium i.e. they all use Driver's Sex, Age, Vehicle, Cover etc they behave differently when generating underwriting terms based on this information (be it differing excesses, endorsements, premium breakdowns). Some of the product BAS files require little over 200 lines...Leave a comment:
-
I have managed to delete a BAS then import a new version and then run the sub within the loaded BAS without any trouble. The problem arrives when I try to remove this BAS to load a new one.
The database is a motor insurance quote engine which will need to load one of several hundred BAS files at runtime dependant on the effective month / years rates selected by the user. I have attached a number of screenshots to try to better highlight...Leave a comment:
-
That would explain the problems I've been having and the reason why a module can be deleted only if the code within had yet to be run.
As an alternative, is it possible to import code from a saved BAS overwriting the contents of a stored module?Leave a comment:
-
Thanks for the suggestion, unfortunately it did not work. I suspect you are on the right lines with the VBA IDEA no refreshing when the module has been deleted. It only seems to refresh once the current sub has finished IF a process within the imported bas has been run.
The other theory I have is with the saving of the imported module. If I use one of the exit buttons on the form (a simple docmd.quit) Access prompts me to save the...Leave a comment:
-
Further to the above, if I try to remove the module (once its been added and the sub within it has been run), using docmd.deleteobj ect from the immediate window, an error box appears suggesting the project is unable to find the module (where as can be seen from the attached screenshot, it is clearly present!).
Should I file this as another odd MS bug and try to find an alternative solution (any suggestions on that front greatly appreciated)?...Leave a comment:
-
Problem trying to remove BAS module after running a procedure within it
I have a .bas file saved locally that I load into my Acces project to run a particular sub. I use the following code to load the module (which works fine):
I use the following loop to remove the module:
The above works fine (both adding the module and subsequantly removing it) provided I do not run any code within the module once it is loaded. The second I use code within the module the... -
The sub in project 2 needs to make use of data within both project 1 and 2 to return data to project 1.Leave a comment:
-
Not sure I can make use of the solution you linked.
I need to do the following:
1. Midway through a sub in project 1 a call is made to a sub in project 2
2. The called sub in project 2 generates endorsements / excesses / premiums using a class in project 1 (not through creating a new instance of said class, rather using the one already active within project 1).
3. Project 2 returns the generated endorsements...Leave a comment:
-
How would I access a container in the calling mdb from the child mdb? Something like:
appParentApp.Mo dules("ModuleNa meHere").Contai nerNameHere ?
One other question; can I not create a class rather than a form to pass the parent mdb through? Using a reference to create an instance of the class in the child mdb like the following:
Application.Ref erences.AddFrom File "C:\MyPath\MyCh ildMDBHere"...Leave a comment:
-
Passing data between 2 seperate projects
I have built a quote engine for the rating of insurance premiums. Each month the rates that generate the premiums change which requires a new database file be created with updated premium tables (we need to keep the old ones so we can quote premiums for different months rates). I use the following dynamic reference to access the relevant rating file dependant upon the user's selection:
Access.Referenc es.AddFromFile "G:\UW Manual\Generic... -
-
Have you got a date/deadline field in the table that indicates when a task needs to be completed? If so run a query by today's date in the OnOpen event of your form and populate a msgbox/report with the results.Leave a comment:
-
Unfortunately the above did not find any records either.
Ive uploaded a couple of screenshots that highlight the problem:
http://www.wow-pickup.com/images/ErrorCode.JPG
http://www.wow-pickup.com/images/ErrorFrontEnd.JPG
http://www.wow-pickup.com/images/QuerySQL.JPG
http://www.wow-pickup.com/images/QueryResult.JPG
The above SQL in the query editor is slightly adapated but produced the...Leave a comment:
-
-
Like query works in query editor but not in VBA code
If i use the following in the query editor it returns rows from my database, however when i run the very same query in VBA the recordset recordcount returns -1 every time:
Code:sql = "SELECT uniqueid, Notes FROM TaskRecords WHERE Notes Like '*" & SearchBox.Value & "*'" UserRS.Open sql, UserConn
No activity results to display
Show More
Leave a comment: