Hello, I just finished a project that creates forms dynamically and my only problem is that the VBA editor screen keeps poping up every time a form is created, anybody know how to fix this?
Thanks in advance!
Hello, I just finished a project that creates forms dynamically and my only problem is that the VBA editor screen keeps poping up every time a form is created, anybody know how to fix this?
Thanks in advance!
One may assume you have an error in your code.
Hmmm nope, it runs without errors, loads the form correctly according to what I said in the query that generates it....it just pops me the window of code, I close it manually and start working with the form, but I want it not to appear or to be able to close it by code...
What's the code?
I use this same code 3 times, this one is to generate an extract from a table....I needed to do it like this because on a continuos form I wasn't able to paint a textbox a certain color depending on the value from the preceding recordPlease Login or Register to view this content.
the next time I use a very similar code to this, is to generate the preview from this first form, and if everything is alright, then save the data to a new table and drop the previous one
the last time I need this code is to update the date values from these saved records....
If there's an easier way to do all this I'd appreciate if you can share that knowledge with me, this database has to be split, then shared with 5 users and I don't want it to keep crashing (that's another problem, sometimes after hitting the save button, it saves the records, crashes, and when it restarts the file is corrupted)
I'm getting an error here:
Which library needs to be installed?Please Login or Register to view this content.
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
In Microsoft Access the CurrentDb method establishes a hidden reference to the Microsoft Office 12.0 Access Conectivity Engine object library in a Microsoft Access database.
I didn't know about the library...got the reference from here:
http://msdn.microsoft.com/en-us/libr...ffice.15).aspx
My bad, I was trying to run this in Excel vba. I'll open Access up and try again.
Can you explain further why are you creating these forms dynamically?
If posting code please use code tags, see here.
Yes...
I need to be able to paint the background of the textboxes on the Tool Field in yellow or red if the preceding record is different from the actual record, and the Resin Field needs to be colored in orange if its value is different from the preceding record (first record is always painted, comparinsons start from record 2 to record N)
If I did the form as a continuos form it would paint all the textboxes (even with the loop cycle) with the last color from the last comparison, and that doesn't work with what I was required to do. So the only option I had was to select the data from the table, and based on the number of records retreived, generate them via VBA with a do while cycle, and that way I had individual textboxes for each record, each with its own unique name, and therefore I'm now able to make the coloring of the texboxes as I need to...
Did you try Access' conditional formatting?
yes, same result, it colored all the records textboxes, even if the values were the same, they were both colored, and that doesn't work for the project...
FYI...I started this project in Excel, it was way easier there (comparing one cell to another instead of a record in a recordset), but they told me it needed to be a multiuser system, so the Excel macro wasn't the best option, that's why I created it with Access
Well, the poping vba screen is still an issue, but I think I managed to prevent the DB to keep crashing over and over again, I just needed to set all the variables and controls to Nothing before the End Function and it appears the problem is solved
Also, I changed this
to thisPlease Login or Register to view this content.
By deleting / commenting the lines shown here, it appears to work faster and without the risk of crashing the DB, I use this similar block of instructions 3 times for 3 different scenarios in the system, and after 2 hours of testing, no crashes have been registered.Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks