var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Return Record Count
I want to create something similar to DLookup in VBA. Given a select string the method should return the value (type Variant), be it an integer, a string, a double etc.
I am using DAO but am getting an error in one of my test examples.
the SQL is SELECT Count(Object) as ObjectCount FROM Object
When trying to pass this string into to
I get (pasted from the debugger window)
Syntax error in FROM clause.
When I paste that SQL string into a QBE window everything works fine.
Anyone have any ideas?
p.s. I know I can do this with DLookup, but I don't want to. I need to make sure the code is migratable to any platform (Java, .NET) and don't want to rely on VB specific calls.
did you try DCount() ?
Edit: please ignore my answer. I didn't see your footnote.
try to take your field and table names into brackets.
SELECT Count([Object]) as ObjectCount FROM [Object];
I believe Object is a reserved keyword in VB.