hi
I have created a program to connect to a Access database and retrieve records from it using a recordset.
I am using the ADOBC.Recordset sort of connection.
I know how to add records, delete records however i dont know how to edit already existing records.
say i have a column called "STATUS" in the access table. when i click the command button i need to edit the value of the 5th row of the STATUS column to 3.
hi all
im doing a project with vb6 and acces.i need to add a new row of data to a table called table1. lets say when i enter a command button txtadd.text data shoud go to address column of the new row. how can i do this.pls help me. im using this code but it is giving me errors
thanx
this code is ok.by using this code new values are added to the first row of the table. but i need to add the new values to a new row, which is at the end of all data in the table.
ad1.Recordset.MoveLast
ad1.Recordset.MoveNext
ad1.Recordset.AddNew "bulb", cmbadd2.Text
ad1.Recordset.Update
i tried above code but it adds the new values to the first raw. how can i add them to a new row?
help pls
thanx
hi
thanx for the reply. i need a nother help
say i have a byte(ex:00110100). i need to the last six bits (110100) to be changed like 001011. which means lsb to msb. and msb to lsb and all other bits also change there position.pls help me with a code or method.
thanx
Function SwapBits(Number As Byte) As Byte
Dim Answer As Byte
Answer = 0
For x = 0 To 7
Answer = Answer + ((Number \ (2 ^ x)) And 1) * (2 ^ (7 - x))
Next x
SwapBits = Answer
End Function
Edit, just noticed you only wanted it to work on the bottom 6 bits. To make it work that way, change the sevens (two of them) to fives.
hi
im working with VB6 and access. i have a command button called "cmddelete". when i click this a row of access table should be deleted. the row has fields "bulb","status","type"when click the button all the fields are deleted. for that im using the following code
This code works correctly and delete the entries of the row. but the problem is since the "dinning room" row is in the middle of the table after deleting there will be an empty row in the middle of the table. i need not to have empty rows. i need to shift the other entries one by one up after deleting the row. how can i do this. what should i add to this code?
pls help me
thanx
Hi
i have a vb interface. i need to do a shedule task after a user specified time period.lets say i have a text box(txttime) to enter the time in milliseconds. when the user click the command button(cmdon), a timer should be enabled and after the specified time expires a massage should be displayed in the label (lblmsg). How can i do this. pls anyone help me with a sample code.
Thanx
Private Sub Command1_Click()
myval = Text1.Text
Timer1.Interval = myval
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = "time expired"
Timer1.Enabled = False
End Sub
Private Sub Command1_Click()
If Val(Text1.Text) <> 0 Then
Timer1.Interval = Val(Text1.Text)
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Timer()
If Form1.BackColor = &H8000000F Then
Form1.BackColor = &HFF0000
Else
Form1.BackColor = &H8000000F
End If
Timer1.Enabled = False
End Sub
The above will turn the backgroud blue after the time in textbox1. I'll leave it for you to make it display a message.