F5 key

I had actually dimensioned db.

i has dim db as Database set.

Is this not correct????
 
I hadn't looked at your screenshot. Have now and it looks okay.

And your reference to Microsoft Data Access Objects 3.? Library is intact?

Have you tried a quick compact and repair of the database?

For your information that "thing" you refer to as the pop-up has a name. It's called Intellisense.

So, what about other properties and methods with Intellisense...do they work?

Try VBA. and see if it drops down for you...
 
Thanks for that.

Other things seem to be working OK, and my Library is intact.

Will have amother go tonight whne i get home and make sure it was not just me cracking up last night.

Thanks again
 
Another observation...

It's a good practice to set your VBA modules to Option Explicit. This ensures that all variables are declared when code is executed.

To turn on Option Explicit open a module and then go to Tools -> Options in the menu. Ensure that Require Variable Declaration is checked.
 
JonK,
This is wot i mean exactly.

When i typed set rec=db. the pop-up did not appear.

Any idea's why????
As I said in my post, You hadn't told Access what db was.

Your code has only two lines:-
    Dim rec As Recordset
    set rec = db.

My screenshot shows four lines:-
    Dim db as Database
    Dim rec As Recordset

    Set db = CurrentDB
    set rec = db.

The line Set db = CurrentDB tells Access db is the current database (that is, to assign the current database object to db). Without this line, db is only an empty variable and you can't use db. in your code.
 
Last edited:
Alternatively, you can forget about creating a database object variable and simply use:

Code:
Set rec = CurrentDb.OpenRecordset("MyRecords")
 

Users who are viewing this thread

Back
Top Bottom