Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 8th, 2003, 04:41 AM
xyfix xyfix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 249 xyfix User rank is Private First Class (20 - 50 Reputation Level)xyfix User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 8 h 26 m 57 sec
Reputation Power: 6
VB in access

Hello , I need help on programming something, here is my situation: I have an access database wivo.mdb with tables and query's. I made a form with checks something in a query "QryIdentiekerecords". What is the proper way in VB to declare all this under a button in the form and see what is in the query? So far i have

Private Sub Knop3_Click()

Dim Wivodb As Workspace
Dim Wivo As Database
Dim QryIdentiekerecords As QueryDef
Dim rs1 As Recordset

Set Wivodb = DBEngine(0)
Set Wivo = Wivodb.OpenDatabase("e:\wivo\wivo.mdb", , True)
Set rs1 = Wivo.OpenRecordset(dbOpenSnapshot)

Wivo.Close
Wivodb.Close

The query is not empty and if i push the button on the form i get the message Error 3078 MS jet database engine cannot find the input table or query '4'. I know the path and the names are correct.
__________________

Last edited by xyfix : October 8th, 2003 at 07:03 AM.

Reply With Quote
  #2  
Old October 8th, 2003, 07:06 AM
xyfix xyfix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 249 xyfix User rank is Private First Class (20 - 50 Reputation Level)xyfix User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 8 h 26 m 57 sec
Reputation Power: 6
vb in access

Basically , I want to know how to declare a database in vb and read/ plot the data of a query in a messagebox

Reply With Quote
  #3  
Old October 8th, 2003, 10:00 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,976 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 17 h 59 m 48 sec
Reputation Power: 802
Can't you just bind your form to the query?

Reply With Quote
  #4  
Old October 8th, 2003, 10:51 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
A Ms Access sample..Hope U have time to read it And it's helpful to U..http://www.freevbcode.com/source/SQLTest.zip

Reply With Quote
  #5  
Old October 9th, 2003, 02:08 AM
xyfix xyfix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 249 xyfix User rank is Private First Class (20 - 50 Reputation Level)xyfix User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 8 h 26 m 57 sec
Reputation Power: 6
vb in access

no , i can't bind the query to the form, because i want to run a procedure that should be under the button in the form. The table written in the previous posting is a temperary table before it can update the real table it has to be submitted to a view checkups. Like this check : there is a collumn, that should increase by one if there exists a record in the real table that has the same set of values like the one in the temperary table apart from the index collumn.

Reply With Quote
  #6  
Old October 9th, 2003, 07:37 AM
xyfix xyfix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 249 xyfix User rank is Private First Class (20 - 50 Reputation Level)xyfix User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 8 h 26 m 57 sec
Reputation Power: 6
vb in access

these are the actual questions?
how can i let the contents of a query pop up in some sort of a box by pushing a button on a form? Is the way shown in my previous posting a good beginning or not? usage of DAO is prefered.

Reply With Quote
  #7  
Old October 9th, 2003, 10:15 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
I have found a sample to access mdb file with DAO..8=) Good luck! Hope its helpful to U!
http://www.freevbcode.com/ShowCode.Asp?ID=1261

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > VB in access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT