'This is declared at the module level (Declarations)
Global Const Mytable = vbRSTypeTable
'This is my Sub_Main and it is in the same module
Dim Wheresitat$
'***Get where the databases are*******
Wheresitat = app.Path & "\OnABC.Mdb"
Set PayDB = OpenDatabase(Wheresitat$, False)
Set Mytable = PayDB.OpenRecordset("FilesAreAt"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Mytable.MoveFirst
DBSAreAt$ = Mytable("FilesAreAt"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Question: I run this and get
Compile error:
Assignment to constant Not permitted When it sets
MyTable.
Can someone please explain to me why? Thank You sooo much
Global Const Mytable = vbRSTypeTable
'This is my Sub_Main and it is in the same module
Dim Wheresitat$
'***Get where the databases are*******
Wheresitat = app.Path & "\OnABC.Mdb"
Set PayDB = OpenDatabase(Wheresitat$, False)
Set Mytable = PayDB.OpenRecordset("FilesAreAt"
Mytable.MoveFirst
DBSAreAt$ = Mytable("FilesAreAt"
Question: I run this and get
Compile error:
Assignment to constant Not permitted When it sets
MyTable.
Can someone please explain to me why? Thank You sooo much