Solved Use Textbox value in a Loop

I will have to remove objects next as I already did compact it. I will read the instructions for prepping files and uploading to this forum
Hi. With regards to the ambiguous name error, sounds like you may have two functions with the same name of fExecuteQuery. Did you name the module Module1?
 
Hi. With regards to the ambiguous name error, sounds like you may have two functions with the same name of fExecuteQuery. Did you name the module Module1?
You called it right. There were two modules with the same code. Now when I trigger Module1 fExecuteQuery....., results in a compile error. user-defined type not defined (these lines are highlighted when the error message dialog appears).
Function fExecuteQuery(strQuery As String, _
Optional intOptions As DAO.RecordsetOptionEnum = dbFailOnError, _
Optional blnReturnAuto As Boolean = False, _
Optional pdb As DAO.Database) As Long)

I got this before when the function isn't defined, but the function exists in Module1. I am looking right at it.
 
You called it right. There were two modules with the same code. Now when I trigger Module1 fExecuteQuery....., results in a compile error. user-defined type not defined (these lines are highlighted when the error message dialog appears).
Function fExecuteQuery(strQuery As String, _
Optional intOptions As DAO.RecordsetOptionEnum = dbFailOnError, _
Optional blnReturnAuto As Boolean = False, _
Optional pdb As DAO.Database) As Long)

I got this before when the function isn't defined, but the function exists in Module1. I am looking right at it.
Hi. Just curious, which version of Access are you using? Also, can you post a screenshot of your References window? Thanks.
 
Hi. Just curious, which version of Access are you using? Also, can you post a screenshot of your References window? Thanks.
Access 2016. As I am working in Access 2016 MS Visual Basic for Applications soI am not sure where my references window is. Here is my workspace showing the Function fExecuteQuery.... below is the same space for the for the cmdUpdate code.
1585448670294.png

1585448764061.png
 
Did you compact it first then zip it? If still too large, remove unnecessary forms/reports/ etc - especially tables with attachment type fields if you have any and are not required for this. The forum is the preferred place to download from. Your link requires an M$ login.
 
Please send me the link with the instructions for prepping a DB for uploading. I ran across a few days ago and now I can't find it :(
 
if you are unable to Upload it at least show a snapshot of table Students structure.
 
if you are unable to Upload it at least show a snapshot of table Students structure.
Here is the database documentation for the students table
Access 2016. As I am working in Access 2016 MS Visual Basic for Applications soI am not sure where my references window is. Here is my workspace showing the Function fExecuteQuery.... below is the same space for the for the cmdUpdate code.

My references. I found them. the Microsoft dAO 3.6 Object Library is missing. There is not DAO folder.
1585523373160.png
 

Attachments

I want to thank each coder that has been assisting me. This underlying thread is not solved but I marking this thread solved. I will be opening new thread with details of the current direction of this issue.

Again, thank you
 
DAO is part of the Database Engine Object Library now. If you're using 2016 you don't need a DAO reference. In fact, you are not allowed to set one.
 

Users who are viewing this thread

Back
Top Bottom