![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
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 ![]() |
|
|
|
|
|
#2 |
|
Expert Programmer
|
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
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
;.; 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 |
|
|
|
|
|
#4 |
|
Expert Programmer
|
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 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. |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
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 ^^ |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|