Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

VB & ACCESS

Thread Tools
 
Search this Thread
 
Old 16 April 2002, 09:18 PM
  #1  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Question

How would I access the tables I have created in MS Access via VB?

I can only access the fields within the table via the Forms I have created.
Old 16 April 2002, 09:55 PM
  #2  
DazV
Scooby Regular
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

you can build database through various levels of abstraction...

-manually with forms
-macros
-hand coded with visual basic

check out access help and look through access basic or whatever they call it. Basically its just interrupt driven vb.

sounds like you need a good book mate

-DV

Old 16 April 2002, 10:04 PM
  #3  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

The d/b is 98% done. But my uncle is trying to imlement two functions in the d/b. He needs to know how to access the tables via VB.

He has accessed the fields in VB via the forms, but not sure how he would access the tables directly, instead of going throught the forms.

He has never used Access, but a ace in programming.

I hope the above makes sense. Things are a bit hectic, final year project, coursework and reports to hand in next week.
Old 16 April 2002, 10:17 PM
  #4  
DazV
Scooby Regular
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

what is he trying to implement ?
its all interrupt driven eg...

on form_open (formname)
[perform task here]

or

on button_click (mybutton)
[perform task here]

or

on keypress (keycode)
[call function code here]

you can write your own custom functions and call them when certain interrupts occur like I've shown above - open one of your forms and goto the view source command on the menu in design mode.
Old 16 April 2002, 11:59 PM
  #5  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

Are you talking about using the vb that comes with access??

or the product "Microsoft Visual Basic" What are you trying to do with the table? Ie. If you can query the field why do you need to access the table??

David
Old 17 April 2002, 08:54 AM
  #6  
Crispin
Scooby Regular
 
Crispin's Avatar
 
Join Date: Jan 2001
Posts: 534
Likes: 0
Received 0 Likes on 0 Posts
Post

David's right - do you want to use MS VB, or just create a form in Access......
Old 17 April 2002, 12:28 PM
  #7  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

VB within Access.
Old 17 April 2002, 12:46 PM
  #8  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

what are the functions you want to do?? give use a clue

David
Old 17 April 2002, 12:49 PM
  #9  
Bal
Scooby Regular
 
Bal's Avatar
 
Join Date: Jun 2000
Posts: 271
Likes: 0
Received 0 Likes on 0 Posts
Post

I'm pretty certain that what you want to do comes with the help.
Look up recordsets.


Bal
Old 17 April 2002, 12:58 PM
  #10  
super_si
Scooby Regular
 
super_si's Avatar
 
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes on 0 Posts
Post

ive got to do this! its a ****

http://www.cs.ncl.ac.uk

then modules then csc124
assignment 3 look at the links and help etc

Si
Old 17 April 2002, 01:09 PM
  #11  
Martingb
Scooby Regular
 
Martingb's Avatar
 
Join Date: Oct 2001
Posts: 65
Likes: 0
Received 0 Likes on 0 Posts
Post

Use recordsets to access tables/queries from code.

e.g:
Dim db as database
dim rs as recordset
dim sSQL as string

set db=currentdb()
ssql = "SELECT table1.* FROM table1"
set rs=db.openrecordset(ssql)

DO ACTIONS ON THE DATA

rs.close
db.close

There is more on this in the help files.

Martin.
Old 17 April 2002, 01:32 PM
  #12  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

Thank u for all the replies/help

David-
My uncle wants to access the tables directly via VB. For example access the members or video table. But I think Martin's comments has given us a solution to the problem.

[Edited by Vinesh - 4/17/2002 1:39:42 PM]
Old 17 April 2002, 04:54 PM
  #13  
DazV
Scooby Regular
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

Bloody hell "Super" Si didn't realise you're down the road from me @ ncl.ac.uk!

Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
TylerD529
General Technical
2
09 October 2015 01:53 AM
Littleted
Computer & Technology Related
4
25 September 2015 09:55 PM
Hangarrat93
Insurance
11
25 September 2015 08:42 AM
farmerwrx
Computer & Technology Related
14
10 September 2015 11:59 AM



Quick Reply: VB & ACCESS



All times are GMT +1. The time now is 09:51 AM.