|
-
Oct 19th, 2000, 08:53 AM
#1
Thread Starter
New Member
I want to add the number in my text box to the number in a database. I can get the number that is my text box to appear in the database. But it does not add it on to the number there before.
Also I would like to arrange the table in accending order using vb. And i need to display the highest number in the database in a text box in vb please can somone help.
Thanks.
Later, Mike
-
Oct 19th, 2000, 11:44 AM
#2
Hyperactive Member
You need to select your number from the database, set it to a variable and then add your number to it. Something like this:
Select myoldnumber from mytable
dim mynewnumber as integer
mynewnumber = myoldnumber + text1.text
''then update your mytable
update mytable set myoldnumber = mynewnumber where myfield = myoldnumber
To order your table just do something like this:
select myoldnumber from mytable order by myoldnumber ascending
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|