|
-
Nov 3rd, 2000, 04:36 AM
#1
Thread Starter
New Member
Someone please help!!!
See code below
Data4.Recordset.Edit
Data4.Recordset("rate of pay1") = Val(txtrop1)
Data4.Recordset("rate of pay2") = Val(txtrop2)
Data4.Recordset("max pay") = Val(txtmaxpay)
Data4.Recordset.Update
the update doesn't seem to be working, when I display
Data4.Recordset("rate of pay1") after the update I get the old value.
NB when the update line executes the program goes to
Private Sub data4_Reposition(), I put the Debug.print statement with Data4.Recordset("rate of pay1"), in the beginning of this sub and here it is already showing the old value.
What am I doing wrong, or where should I do the update
Thanks in advance guys
-
Nov 3rd, 2000, 04:42 AM
#2
Fanatic Member
If the values are in the text boxes on the same form, why not bind them directly? If on a different form then qualify the controls e.g. Val(frmOtherForm.txtrop1)
It may be that the value is not visible. Give me a few more details - what you are attempting, how the forms interact etc and I will try and help.
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 3rd, 2000, 05:07 AM
#3
Thread Starter
New Member
The textboxes are on the same form and the values in the textboxes are user input and validated before the Update takes place. If thats of any help.
nb Just before the update the value that is moved to
Data4.Recordset("rate of pay1") is still there but after the update command executes the old value is in Data4.Recordset("rate of pay1") Strange!!
-
Nov 3rd, 2000, 08:31 AM
#4
Lively Member
Whenever I use the Data Control, after an Update, I always use the Refresh method, seems to work OK for me.
Data1.Edit
.
.
Data1.Update
Data1.Refresh
Cheers
Adrian.
-
Nov 3rd, 2000, 08:37 AM
#5
Fanatic Member
Are you sure your recordset is updatable? The edit mode will post changes but the update will attempt to finalise those, if the recordset is not updatable it will not work. It also may be that one or two of the fields are not updatable.
Without more details (i.e. environment, connection details etc.) I can't tell.
Cheers,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
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
|