Advertisement

05.20.2008 at 09:06AM PDT, ID: 23417752
[x]
Attachment Details

Need help with DAO recordset connection

Asked by EverythingVB in Microsoft Access Database, Visual Basic Programming, Access Coding/Macros

Tags: Microsoft, Access, 2007, vba, ie 6

Hi

Ok I haven't used Access for years but I'm back in it now and simply trying to get the record count for a table in an external database...it doesn't work, here is my simple code......

Dim dbproject As DAO.Database
Dim rst As DAO.Recordset

Set dbproject = ("C:\Documents and Settings\Testing\Desktop\Helpdesk Projects DB")
Set rst = dbproject.OpenRecordset("ProjectTable", dbOpenDynaset)

MsgBox rst.RecordCount



I tried it inside the Helpdesk Projects DB database as well and a weird thing happened it gave me the recordcount result as 1 no matter how many records are in the table.

any help will be appreciated

also, if anyone can let me know....can I use the DoCmd object within the DAO connection code or do I have to stick with the DAO type library? I'm pretty dumb when it comes to access programming

thanks again

Start Free Trial
[+][-]05.20.2008 at 09:13AM PDT, ID: 21607642

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2008 at 09:14AM PDT, ID: 21607661

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2008 at 09:15AM PDT, ID: 21607675

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:23AM PDT, ID: 21607741

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:24AM PDT, ID: 21607757

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Visual Basic Programming, Access Coding/Macros
Tags: Microsoft, Access, 2007, vba, ie 6
Sign Up Now!
Solution Provided By: capricorn1
Participating Experts: 4
Solution Grade: A
 
 
[+][-]05.20.2008 at 09:26AM PDT, ID: 21607774

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:36AM PDT, ID: 21607879

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:37AM PDT, ID: 21607885

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:39AM PDT, ID: 21607905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 09:40AM PDT, ID: 21607914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 10:27AM PDT, ID: 21608304

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 10:31AM PDT, ID: 21608351

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 12:03PM PDT, ID: 21609185

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628