473,516 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh adodc to match record_id in the Access

6 New Member
Hi,


Any suggestion how to refresh adodc to match id (autonumber) in the Access table? When I scroll adodc it does not go from 1 to the last record.

Thanks

Milan
Oct 20 '08 #1
3 1257
debasisdas
8,127 Recognized Expert Expert
try to use REQUERY method.
Oct 20 '08 #2
vico20
6 New Member
Thanks for replay. I add it after AdodcCustomer.Recordset.Update but it did not make any difference. I must say I do not have much experience in programming This is a part of my code. My form has got a textbox with Request Number that should be populated from Access table and start from 1 when the tools runs or if I scroll adodc scroll bar .

This a part of my code for Save Button

Private Sub CmdSave_Click()
'save records

If MsgBox("Save changes?", vbQuestion + vbYesNo, "Save") = vbYes Then
'saves fild to textboxes
If IsNumeric(TxtSpentHours.Text) = True Then
AdodcCustomer.Recordset.Fields![Spent hours] = TxtSpentHours.Text
End If
AdodcCustomer.Recordset.Fields![Contact person] = TxtContact.Text & ""
AdodcCustomer.Recordset.Fields![Started date] = TxtStartedDate.Text
AdodcCustomer.Recordset.Fields![Received] = TxtReceived.Text & ""
AdodcCustomer.Recordset.Fields![Job code] = TxtJobcode.Text & ""
AdodcCustomer.Recordset.Fields![Requested_by] = txtRequestedby.Text & “”
AdodcCustomer.Recordset.Fields![Finished by] = TxtFinishedby.Text
AdodcCustomer.Recordset.Fields![Description] = TxtDescription.Text
AdodcCustomer.Recordset.Fields![Location of data] = TxtLocation.Text
AdodcCustomer.Recordset.Fields![Readme file] = TxtReadme.Text
AdodcCustomer.Recordset.Fields![MXD file] = TxtMxd.Text
AdodcCustomer.Recordset.Fields![Comment] = TxtComment.Text

AdodcCustomer.Recordset.Update
AdodcCustomer.Recordset.Requery
Else
End If

End Sub
Oct 21 '08 #3
vico20
6 New Member
try to use REQUERY method.
Thanks for replay. I add it after AdodcCustomer.Recordset.Update but it did not make any difference. I must say I do not have much experience in programming This is a part of my code. My form has got a textbox with Request Number that should be populated from Access table and start from 1 when the tools runs or if I scroll adodc scroll bar .

This a part of my code for Save Button

Private Sub CmdSave_Click()
'save records

If MsgBox("Save changes?", vbQuestion + vbYesNo, "Save") = vbYes Then
'saves fild to textboxes
If IsNumeric(TxtSpentHours.Text) = True Then
AdodcCustomer.Recordset.Fields![Spent hours] = TxtSpentHours.Text
End If
AdodcCustomer.Recordset.Fields![Contact person] = TxtContact.Text & ""
AdodcCustomer.Recordset.Fields![Started date] = TxtStartedDate.Text
AdodcCustomer.Recordset.Fields![Received] = TxtReceived.Text & ""
AdodcCustomer.Recordset.Fields![Job code] = TxtJobcode.Text & ""
AdodcCustomer.Recordset.Fields![Requested_by] = txtRequestedby.Text & “”
AdodcCustomer.Recordset.Fields![Finished by] = TxtFinishedby.Text
AdodcCustomer.Recordset.Fields![Description] = TxtDescription.Text
AdodcCustomer.Recordset.Fields![Location of data] = TxtLocation.Text
AdodcCustomer.Recordset.Fields![Readme file] = TxtReadme.Text
AdodcCustomer.Recordset.Fields![MXD file] = TxtMxd.Text
AdodcCustomer.Recordset.Fields![Comment] = TxtComment.Text

AdodcCustomer.Recordset.Update
AdodcCustomer.Recordset.Requery
Else
End If

End Sub
Oct 21 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2625
by: Martin Wulfe | last post by:
I want to use a connection to an existing MS Access database, but I want to be able to change which table is used to fill the datalist, using VB6, at run time by late binding the datalist to the table. Using either an ADO connection or an ADODC control, I can fill the datalist OK the first time, but when I try to clear it and fill it from...
4
5974
by: Raoul Watson | last post by:
I have a form with an AdoDc control associated to a datagrid. The AdoDC uses a "ConnectionString" such as "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=..." this is where the problem begins. The data source will not be known until the user selects the database. What is really weird is that if the source is not...
0
1054
by: Tony | last post by:
After upgrading from XP SP1 to XP SP2 get "operation is not allowed when the object is open" error messege. the app in production stop working properly. The refresh method is available, but fails. Here is the code: With Adodc1 ..ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path +...
7
4057
by: Lisa | last post by:
I have an Access 2000 application that uses the following function to re-link my tables when I switch from my Current back end to a Dummy back end. I also use it to refresh my links. Function CreateODBCLinkedTables() As Boolean On Error GoTo CreateODBCLinkedTables_Err Dim strTblName As String, strConn As String Dim db As DataBase, rs As...
1
13292
nateraaaa
by: nateraaaa | last post by:
While working on a recent project I discovered how useful the CommandArgument property can be. I needed to determine the record_id of a row displayed in my datagrid. When the user clicked the Edit ImageButton I needed to redirect the user to the Edit page where the data on the page would be prepopulated with data from the database. I tried several...
5
9392
by: vai | last post by:
i'm working in visual basic. i want to dispaly the records in a datagrid control who's data source is adodc.i want to display the records for a particular date. i.e. if the date which i accept from the user exists,then for that particular date all the records must be displayed. my problem is when i run my form all the records are displayed....
2
1868
by: SHIBSHIB | last post by:
i prepare a vb project with adodc control where data will be extracted from an access file. to make an .exe file of that project what should be the path in adodc so that the exe file will be executed normally. shibshib
9
3307
by: Neelesh2007 | last post by:
Hi All, I have developed project in VB6.0 with access as backend.I have used ADODC control in VB to retrieve data from access. I have created the Setup file by Package & Deployment. Now when i install the software on other PC whole program works fine but ADODC can not establish connection with database. Then if I install VB6.0 then only ADODC...
1
2110
by: hussainiyad | last post by:
Dear all, i,m new to v.b and i tried to connect to sqlserver through adodc in a datagrid or datalist , but there was no result in my form, can any one tell me what's the reason and i done every thing to connect with the sql step 1:Right click the adodc control declared the provider,database,pwd step2.: In choose Record source i declaled the...
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.