473,789 Members | 2,408 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 1266
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.R ecordset.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(TxtSp entHours.Text) = True Then
AdodcCustomer.R ecordset.Fields ![Spent hours] = TxtSpentHours.T ext
End If
AdodcCustomer.R ecordset.Fields ![Contact person] = TxtContact.Text & ""
AdodcCustomer.R ecordset.Fields ![Started date] = TxtStartedDate. Text
AdodcCustomer.R ecordset.Fields ![Received] = TxtReceived.Tex t & ""
AdodcCustomer.R ecordset.Fields ![Job code] = TxtJobcode.Text & ""
AdodcCustomer.R ecordset.Fields ![Requested_by] = txtRequestedby. Text & “”
AdodcCustomer.R ecordset.Fields ![Finished by] = TxtFinishedby.T ext
AdodcCustomer.R ecordset.Fields ![Description] = TxtDescription. Text
AdodcCustomer.R ecordset.Fields ![Location of data] = TxtLocation.Tex t
AdodcCustomer.R ecordset.Fields ![Readme file] = TxtReadme.Text
AdodcCustomer.R ecordset.Fields ![MXD file] = TxtMxd.Text
AdodcCustomer.R ecordset.Fields ![Comment] = TxtComment.Text

AdodcCustomer.R ecordset.Update
AdodcCustomer.R ecordset.Requer y
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.R ecordset.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(TxtSp entHours.Text) = True Then
AdodcCustomer.R ecordset.Fields ![Spent hours] = TxtSpentHours.T ext
End If
AdodcCustomer.R ecordset.Fields ![Contact person] = TxtContact.Text & ""
AdodcCustomer.R ecordset.Fields ![Started date] = TxtStartedDate. Text
AdodcCustomer.R ecordset.Fields ![Received] = TxtReceived.Tex t & ""
AdodcCustomer.R ecordset.Fields ![Job code] = TxtJobcode.Text & ""
AdodcCustomer.R ecordset.Fields ![Requested_by] = txtRequestedby. Text & “”
AdodcCustomer.R ecordset.Fields ![Finished by] = TxtFinishedby.T ext
AdodcCustomer.R ecordset.Fields ![Description] = TxtDescription. Text
AdodcCustomer.R ecordset.Fields ![Location of data] = TxtLocation.Tex t
AdodcCustomer.R ecordset.Fields ![Readme file] = TxtReadme.Text
AdodcCustomer.R ecordset.Fields ![MXD file] = TxtMxd.Text
AdodcCustomer.R ecordset.Fields ![Comment] = TxtComment.Text

AdodcCustomer.R ecordset.Update
AdodcCustomer.R ecordset.Requer y
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
2636
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 another table, the contents of the datalist do not change. I must be doing something really dumb...
4
5983
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 placed during design time, during run time the form upon loading will generate an error ("Failed to
0
1067
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 + "\PhoneNumbers.mdb" & "; Mode=Read|Write" ..RecordSource = "select * from PhoneNumbers Order By Name"...
7
4087
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 Recordset, tbl As TableDef Dim DatabaseName As String Dim ServerName As String
1
13309
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 things without success then discovered that the CommandArgument property could be used for this...
5
9407
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. the records ,which are in my access database table. so i set the following properties, ...
2
1897
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
3325
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 works. Can any body guide me how can i create set-up file so that i can install my software without...
1
2175
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 commad type as "cmd table" and as well the table name step 3 : Draged a data grid and declared the...
0
10400
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10189
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10132
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9974
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9010
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7523
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5412
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5544
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3688
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.