Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 4th, 2005, 11:35 AM   #1
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
vb db macro

hey im doing a database at school
and i thought id add some vb code to it
to make it a bit more fun ^^

anyway i have a button and loys of text box controls linked to one table
and i have 1 blank text box which i want to link with another table
but i cant.
so how can i write, edit, delete, and read records so when i press the button it
increases a value in a table then reads it into the blank text box.
pls help
i kinda got behind with my work for doing this >_<

thanks
cloud- is offline   Reply With Quote
Old Apr 4th, 2005, 1:15 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Could you tell us what database you're using and also the set up (whether it's an external program or some VBA for example)? Thanks
Rory is offline   Reply With Quote
Old Apr 4th, 2005, 1:42 PM   #3
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
;.; sorry, i meant an actual microsoft access database (using the vbcode..like a macro)

not actually using vb6
the table is called members
and the value should come from the "points" bit in the table
eg

members table:
memberid..............points
1............................0
2............................0
3............................0

when i click the button i want to increase the original points value
by 5 for the member id in variable "Member"...

any ideas

thanks alot
cloud- is offline   Reply With Quote
Old Apr 4th, 2005, 8:14 PM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Well if you had an access form with a textbox linked to the score field, and a command button it's code would probably be:
Private Sub CmdAddToScore_Click()
Points.Text = Points.Text + 1
End Sub
Thats in VBA (right click on button & build event), Access macros are next to useless.
Obviously you don't need a Points text box, as you could manipulate the field directly, or the points textbox could be disabled so the user could only view it.
Rory is offline   Reply With Quote
Old Apr 5th, 2005, 4:17 AM   #5
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
im usinga a relational database (with 3 tables)...
it seems i cant link more than one
else i cant get the info i need from the other tables.
the form controls (apart from button and points text box) is linked to the "rental" table
points and button needs to be linked to member table
the rental table is changed each time so i cant put points on that
any way?
maybe i can write to a textfile and read if thats possible

thanks alot for the help ^^
cloud- is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC