dao rather than DAO

  • Thread starter ragtopcaddy via AccessMonster.com
  • Start date
R

ragtopcaddy via AccessMonster.com

What would cause my dim statements to show lower case dao rather than upper
case DAO? I checked my references and intellisense puts the "QueryDef" after
"dao.", but I've never seen this behavior before.

Thanks,

Bill
 
L

Lord Kelvan

could be that the dao libarary is not referenced in your code or it
could just be a glitch of some form does your code still work

Regards
Kelvan
 
B

Bob Barrows [MVP]

ragtopcaddy said:
What would cause my dim statements to show lower case dao rather than
upper case DAO? I checked my references and intellisense puts the
"QueryDef" after "dao.", but I've never seen this behavior before.
That only happens to me when I've made a mistake somewhere that caused my
code to fail to compile. I can typically find it by forcing a recompile by
choosing the relevant option in the Debug menu (I can't remember the exact
title, but it's unmistakable)
 
D

david

Or if
Tools | Options | Auto Syntax Check
has become unchecked.

The Auto Syntax Check uses a different definition of 'dao' than
'Auto List Members' does or than the compiler does: It's got
it's own parser. They are all three independent of each other.

(david)
 
J

Jamie Collins

What would cause my dim statements to show lower case dao rather than upper
case DAO? I checked my references and intellisense puts the "QueryDef" after
"dao.", but I've never seen this behavior before.

Paste the following into an empty module:

Sub Main1()
Dim sql As String
End Sub

Sub Main2()
Const SQL As String * 5 = "SELECT"
End Sub

Note 'Dim sql' has changed to 'Dim SQL' (i.e. uppercase 'SQL').

Now paste in this (set a reference to DAO if necessary):

Sub Main3()
Dim rs As DAO.Recordset
End Sub

Sub Main4()
Dim dao As String
End Sub

'Dim rs As DAO.Recordset' will become 'Dim rs As dao.Recordset'.

Do you see what's happeneing here...?

To correct your problem, try declaring a spurious variable as

Dim DAO

(i.e. uppercase 'DAO') and compiling then remove the spurious
declaration.

Jamie.

--
 
R

ragtopcaddy via AccessMonster.com

Jamie,

Thanks a lot. Curious behavior, to say the least.

Bill
 
Top