Thanks - I think in my case creating a table with the variable would be most appropriate.
But how do I open that table (let's say it's called "StoredVariables") & then refer to a field in that table? I used the OpenTable method of DoCmd, but when I tried to refer to a field in a...
I am still having trouble with this. For some reason, the program can't find one of the fields listed in the SQL even immediately after the
Me.RecordSource = "SQL"
I put:
varfieldname = "fieldname"
msgbox Me(varfieldname)
immediately after the SQL just to see if it is...
Thanks to everyone for all your help so far!
Another question:
How do I save a value even if the user exits the application & have it available the next time he runs the application? In the old dBase languages, there was something called a "memory variable". Is there something...
That was it! I needed to exchange the ! for a .
Now the next question - I think I'll start a new thread with this as well:
If I want to refer to a field from the SQL stuff in a different part of my code, what is the full reference for it? The query no longer has a name because I copied the...
I have a report that is opened via a macro. The OnOpen event has the following code:
Me!RecordSource = "SELECT ..." (This is copied from the SQL view of a query)
I keep getting
'Runtime Error 2465:
[My application name] cannot find the field "RecordSource" referred to in...
Also, Kathryn - I'd rather use 5 buttons - I think in this case it will be less confusing, because the users will see exactly where they are in the process.
Can you tell me specifically how to use a static variable to keep their place? I'm new to VBA.
Caroline
I have a form with 5 buttons. The user must click those buttons in order - for example, they will mess things up if they click button 2 before button 1, or if they click button 1 twice. I'd like to disable the button upon successful execution of the macro called when the button is clicked.
I...
Unfortunately, I am NOT setting up the tables - I've inherited them.<br><br>The reports are 1 page per student. All students being printed will be in the same term, but not be printing the same comment. I do not have a "termid" field, but perhaps I could have the...
Yes, that is my table structure. But I don't understand how to write the query.<br>At the end of term1, I want to print the code description of comment1, at the end of term2, I want to print the code description of comment2, etc.<br><br>If possible, maybe using a slightly different...
Thanks. I'll need to think about this one properly. Just a few questions on it:<br>1) The 2 tables you specified: I'm not sure I understand them. Is one where the user enters the code & the other where the codes & their related comments are stored?<br>2) If...
I'm not sure if this is the right place to ask my question.<br>I have a report based on a query. The query joins one of 4 "comment codes" in table with the actual comment from the comment table. I want it to choose which of the 4 comment codes to join with the comment table...
I would like to create 2 buttons on the user interface - both will print the same report, but in different orders (one in order of lastname of the student, one in order of the gradelevel of the student).<br>Can I use a macro? What would the steps be?<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.