Ms Access Hangs Up During Rs.update??

Mar 4, 2007

hello..

I have this problem that when I update the value in one of my tables, MS Access hangs up. I don't know why. I dont know if it's because of the updating or because of something else.. Any help would be greatly appreciated.. Thanks in advance! ;)

here the code that's executed when the approve button is clicked..

Private Sub Command43_Click()

Answer = MsgBox("Are you sure you want to approve this timesheet? Note that only projects approved by respective project managers will be approved.", vbYesNo)
'if cancelled
If Answer = vbNo Then
Else
Dim rs As Object
Dim x As Integer 'will be used as a flag for do while loop

x = 1 'initialize flag
Set rs = Me.Recordset.Clone

rs.FindFirst "[weekending] = #" & Format(Me![weekending], "mm/dd/yyyy") & "#"

'finding the first record wich matches the weekending doesn't give the right record
'right away. it may give a record with the right weekending but different eno. that is
'not supposed to happen. so once a weekending match is found, check if the eno also
'matches. this do..while loop will do the trick =)
Do While x < 18
If rs!eno = Forms!TimesheetDetailsFrm!eno And rs!statusPM = "approved" Then
rs.Edit
rs!status = "approved"
rs.Update
x = x + 1
End If
rs.FindNext "[weekending] = #" & Format(Me![weekending], "mm/dd/yyyy") & "#"
Loop

'close this form and refresh the 'timesheets for approval' form
Answer = MsgBox("You have successfully approved the timesheet. Close this window to continue viewing other submitted timesheets.")
Forms!SupervisorFrm.Requery
End If

End Sub


Thanks again..

ps. How do I mark a post as 'resolved'? Coz I have a previous post which has already been solved.. Thanks to all of you guys. ;)

View Replies


ADVERTISEMENT

Access Hangs On Form_Load Event

Feb 24, 2006

My Access app hangs when running the following code on Form_Load:

VB Code: Original - VB Code Private Sub Form_Load()On Error GoTo listbox_errorDim strSQL As String, strList As StringDim listrs As New ADODB.RecordsetSet listrs = New ADODB.RecordsetstrSQL = "SELECT * FROM sections"listrs.LockType = adLockPessimistic With listrs .ActiveConnection = open_conn() .Open (strSQL) End WithDo Until listrs.EOFstrList = strList & listrs("id").Value & ";" & listrs("section").Value & ";"LoopstrList = Left(strList, Len(strList) - 1)Me.cmbSection.RowSource = strListMe.cmbSection.RowSourceType = "Value List"listrs.CloseSet listrs = Nothinglistbox_error:MsgBox Err.DescriptionExit SubEnd Sub  Private Sub Form_Load()On Error GoTo listbox_errorDim strSQL As String, strList As StringDim listrs As New ADODB.RecordsetSet listrs = New ADODB.RecordsetstrSQL = "SELECT * FROM sections"listrs.LockType = adLockPessimistic         With listrs         .ActiveConnection = open_conn()         .Open (strSQL)         End WithDo Until listrs.EOFstrList = strList & listrs("id").Value & ";" & listrs("section").Value & ";"LoopstrList = Left(strList, Len(strList) - 1)Me.cmbSection.RowSource = strListMe.cmbSection.RowSourceType = "Value List"listrs.CloseSet listrs = Nothinglistbox_error:MsgBox Err.DescriptionExit SubEnd Sub

The connection is in a module named publicfunction:
VB Code: Original - VB Code Public Function open_conn() As ADODB.Connection 'Opens connections to database Dim sPath As String sPath = CurrentProject.Path & "endjftocbe.mdb" Set open_conn = New ADODB.Connection With open_conn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=" & sPath & "; Jet OLEDB:Database Password=*****" .Open End WithEnd Function  Public Function open_conn() As ADODB.Connection     'Opens connections to database     Dim sPath As String     sPath = CurrentProject.Path & "endjftocbe.mdb"     Set open_conn = New ADODB.Connection     With open_conn     .Provider = "Microsoft.Jet.OLEDB.4.0"     .ConnectionString = "Data Source=" & sPath & "; Jet OLEDB:Database Password=*****"     .Open     End WithEnd Function

Any ideas why it is hanging? The conn to the database is successful when I use it for the login procedure, but after that, I can't seem to get back in.

thanks

View 1 Replies View Related

Access Hangs While Scrolling Columns

May 29, 2015

Access 2007 has hung up while I scrolled from left to right through the columns in a linked ODBC table in datasheet view. I understand why it "hangs" while scrolling through rows, but I've never heard of it doing this for columns and I am talking about a complete freeze up here.

View 3 Replies View Related

General :: When Converting Front End To MDE Access Hangs

May 4, 2013

When converting the Front End of my database to an MDE, Access just hangs and says (Not Responding). I've left it our an hour and there's no sign of stirring.The Back End converts in just a second or so.

View 5 Replies View Related

New Problem, Small Change Hangs Access/TOAD

Dec 18, 2005

OK, sorted out that last problem I had.... Heres a new one.

This query runs fine:

SELECT [Piping Models by Area].AREA_NAME, [Piping Models by Area].MODEL_NO, [All Pipes].LINE_ID, [All Pipes].PIPING_MATER_CLASS, [All Pipes].PIPE_LENGTH

FROM [Piping Models by Area] LEFT JOIN [All Pipes] ON [Piping Models by Area].PARTITION_NO = [All Pipes].PARTITION_NO

WHERE [Piping Models by Area].AREA_NAME like "545*"

ORDER BY [Piping Models by Area].AREA_NAME, [Piping Models by Area].MODEL_NO, [All Pipes].LINE_ID, [All Pipes].PIPING_MATER_CLASS;

Add one WHERE criteria, and it no longer runs, under Access or TOAD for Oracle, or SQL*Plus, or anything:

SELECT [Piping Models by Area].AREA_NAME, [Piping Models by Area].MODEL_NO, [All Pipes].LINE_ID, [All Pipes].PIPING_MATER_CLASS, [All Pipes].PIPE_LENGTH

FROM [Piping Models by Area] LEFT JOIN [All Pipes] ON [Piping Models by Area].PARTITION_NO = [All Pipes].PARTITION_NO

WHERE [Piping Models by Area].AREA_NAME like "545*" and [All Pipes].PIPING_MATER_CLASS = "F13B"

ORDER BY [Piping Models by Area].AREA_NAME, [Piping Models by Area].MODEL_NO, [All Pipes].LINE_ID, [All Pipes].PIPING_MATER_CLASS;

It works fine, and is nice and fast, until I add the second "WHERE" criteria.

[Piping Models by Area] and [All Pipes] are both queries and run fine on their own. This query also runs fine without the WHERE clause.

Any ideas? Is there some small syntactical error causing some kind of infinite loop or something?

Edit: formatted for easier viewing

View 1 Replies View Related

Hangs & Exit

Aug 21, 2005

I'm having an application which is developed in access. It's running quite well, some times when I made changes to forms or reports it hangs for a while and exits without saving, it happens sometimes not always... what could be the problem? how can I rectify this..

View 3 Replies View Related

Query Hangs When Trying To Run?

Sep 12, 2014

I am facing a recent problem in my access 2002 and access 2010 on my computer. I am not able to run new queries even simple ones because when I try to execute it , it starts to hangs and access stop responding.

View 1 Replies View Related

Hyperlinked PDF Package Hangs Computer

Jan 14, 2008

I have hyperlinks from within Access forms that link to Adobe PDF documents; these are the new PDF Package documents created with Acrobat 8 - and give the message "Multiple files are bound together in this PDF Package."

The problem I am having is that when ever I click on the hyperlink the computer hangs (from the task manager, I believe that it is Acrobat Reader that is hanging). This problem only occurs with multi-file PDF packages and does not occur with regular PDF's. It also only occur with MS Access, as linking to theses files from MS Word encounters no problems.

Is anyone aware of a fix for this?

View 6 Replies View Related

Modules & VBA :: OutputTo Hangs On Error 52

Nov 10, 2014

Some of my users do not have access to all of our servers. In trying to automate I've hit one user whose system hangs up when Access tries to write to a server folder she does not have write (or even read) permissions for (Error 52, Bad file name or number). See the "Me.CitationType > 500" line below.

Code:
Private Sub comboStatus_AfterUpdate()
Dim hDate As String
Dim sFile As String

[Code]....

It gets as far as "If Len(Dir(hDate, vbDirectory)) = 0" and then hangs with Error 52. Testing for Dir() sooner doesn't work either.

how to either test for read-write permissions or trap Error 52. "On Error GoTo ErrorHandler" never fires to even test for 52, unless I'm missing something.

View 6 Replies View Related

Computer Hangs Accessing Network Database Files

Oct 6, 2004

And yes I now that's the title of a Knowledge base article, I stole it because it put into words what I can only say in expletives right now.

Basically, well it's all a bit odd.
I got users on the network who, until yesterday, could access some networked databases. Other files from the same source are ok, just Access files.
Today the moment they click (and I mean a single-click) on the icon to open the database...explorer hangs.
You can't open the database from within MS Access either, that hangs too. But you CAN open them up and use them if you can get them copied locally.
Oh yeah, some people (in the same room, on the same VLAN) can access the database, but can't perform any tasks within it.
Databases are a mix of 97 and 2000.
And to make matters worse, it's happening on another server.

I know you're gonna shout virus, but that looks to be a non-starter since I know of no such virus which would affect ONLY Access files and do it on a single click, and secondly The systems check out fine with both Sophos (and our good luck charm AVG) run against them.

Holy Moley! Has anyone ever come accross such a palarva?

View 2 Replies View Related

Um... Acess Hangs Temporarily When My Mouse Hovers Over 'Print' Icon

Mar 20, 2006

Hi there

Strange problem, i'm using XP Pro and Access from Office 2003 (both real full versions from work) - and in general use, when the mouse hovers over the 'print' icon (at the top left, undernear file, edit, view, insert, near 'save', 'new', etc), then access will hang for about 20 seconds then snap back into action.

Now, i don't even want to print anything! But every now and again i accidentally hover over it and it's bugging the hell out of me. Everything is updated (but i will check again now).

Anyone know how to make this stop? I tried a quick search but didn't get far.

Cheers!

Edd

View 3 Replies View Related

Update Query Won't Update In Access 97

Feb 10, 2008

I am trying to remove random characters from a field. The field [assycode] contains a string similar to say, FGEJBF1 or ABFGYRUKC I want to remove any occurrence of "F1" normally at the end of the string but not always at the end. I used: Like "*f1*" to find the correct records, that worked fine, I then used [Assycode]-" f1" in the update to box, It wants to update 146 records I click ok then it says It couldn't due to a type conversion error. Just messing around I tried adding "F1" to these records using [Assycode]+" f1" and it worked fine. Can anyone point me in the right direction?

Thanks in advance

Wayne

View 5 Replies View Related

Help With Access Value Update

Jan 27, 2006

You are the only people can help me .my problem is with a ict project and as you can see i have a database as in the picture .want to do is that when i enter a value in the dvd id in the rent table i also want the dvd Title to be automatically updated with the correspondong value . Hope you can save the day thnx in advance.

View 4 Replies View Related

ODBC Access Update

Apr 8, 2008

Used to use these forums quite regularly and always found people to be of help, even started chipping in occasionally with the odd pearl myself :rolleyes:

Anyhow, having forgotten my username i'm back under a different guise and have a problem that i'd like some help with.

My company has a website running asp (not .NET) with an sql database backend. Basically we want a localised system to deal with order processing with daily updates to customer, order tables etc. I started to build something in VB and SQL but time is critical and once I work out this problem I can churn something out in access double quick time.

I can get the ODBC connection open to the sql database and import the data to Access 2007 table (ie dbo_tblOrders), but I then need to find/write some code to fetch extra records daily and append them to the EXISTING tables. At present data is fetched and added to a new table. Is it merge queries I need? If so how, and can I set it to only fetch new records?

View 11 Replies View Related

Access 2003 Update

Dec 18, 2007

I have two tables that are identical in format. They contain different primary keys. I want to combine them into one table. I have tried to set up a table with all the primary keys of both tables and do an update. I keep getting invalid argument. The sql statement is valid. The problem appears to be the field with OEL object. In access 97 I have know problem. Does any one know how to solve this problem? The table in 2003 is too big to convert to access 97.

View 1 Replies View Related

Update Access Database From Another

Dec 17, 2004

I am trying to update the tables of 1 access database from another access database. Does anyone know the call function or how would I go about doing that?

Thanks

View 1 Replies View Related

ASP Access Update Beginner!!!

Jun 6, 2006

I have a simple table "Line" with Columns Key, OrderNumb, Panels, Gates, Posts, Color, Memo, Comp. A user enters the information into the powder.asp page. It is then added to the database. The Comp Column is populated NO by a hidden input type. The data is then displayed on a page in a table and the last column has a submit button. When the user Presses that button I would like it to update that record in the database to change Comp to YES. Some code snipits are below. The first is where the data is presented and where the submit button is. It then will go to the next snippet that hypotheticly will change just the Comp on that record to YES. I can't get it to work. Thanks Code:<form method="POST" action="powder_comp.asp"> <tr> <td valign="top" align="left"><%= rs("OrderNumb") %></font></td> <td valign="top" align="left"><%= rs("Panels") %></font></td> <td valign="top" align="left"><%= rs("Gates") %></font></td> <td valign="top" align="left"><%= rs("Posts") %></font></td> <td valign="top" align="left"><%= rs("Color") %></font></td> <td valign="top" align="left"><%= rs("Memo") %></font></td><td valign="top" align="left"><input type=hidden name="OrderNumb" value="<%=rs("OrderNumb")%>"><input type="submit" value="submit"></form></font></td>
Code:<%OrderNumb=request.form("OrderNumb")accessdb="Powder" cn="DRIVER={Microsoft Access Driver (*.mdb)};"cn=cn & "DBQ=" & server.mappath(accessdb)Set rs = Server.CreateObject("ADODB.Recordset")sql = "SELECT * FROM Line Where OrderNumb=OrderNumb ;"rs.CursorType = 2rs.LockType = 3rs.Open sql, cnrs.Updatesql = "UPDATE Line Set Comp=Yes"rs.CloseSet rs = NothingSet cn = Nothing%><META HTTP-EQUIV="Refresh" CONTENT="0; URL=powder.asp">
I'm still very new to this so please go easy on me.

View 2 Replies View Related

Update Record In Access Using ASP

Aug 20, 2006

Hi Guys

Help needed on probably a newbie issue.

I am trying to update a field in my DB called USER_TYPE this can be either a 0 or 1. below is code I am trying to use... stop s******ing lolol

Code:SQL = "Update CustRecords SET CUST_TYPE=1 WHERE id="&id

Help truly needed!!

Ian

View 3 Replies View Related

MS Access Data Update

Feb 17, 2012

I have a database it contains data more than 4 million line items but while i try to run macro or any query the database reaches the maximum limit of 2 gb , then the particular query not functioning and then i need to compact and repair. After compact and repair also the same issue is continuing.

View 1 Replies View Related

Update Access Db By HTML Page

Dec 6, 2005

first i'm sorry on my english.


I have in my work some computers with network.

I want to send mail to one computer, the mail is like form in HTML
have 3 things:
1. textbox
1 select
1 submit

is it possible to get the mail and to write in the mail and send it (by submit button) then to update the access db.

I have no idea.
if there is an easy way to do it, I will happy to hear.

[I think to do it with an asp page in each computer that the HTML send the items to the ASP page (by request.get) then the asp page update the db].

View 2 Replies View Related

How To Update Access After Adding A New Field?

Apr 27, 2007

Hi

1. I need to know how to update the field list of the query after
adding a new field into the table and the query?
2. I need to know how to update the records table after adding
calculated filed?

View 1 Replies View Related

Update Query Issue (new To Access)

Sep 20, 2006

I've found myself having to start using Access due to record limits. My reports come to me in Excel and go out in Excel, but by sheer quantity I need to store records in Access.

My problem is in an Update Query:
I import records into a 'DoNotDelete' table and then run an update query to the 'CallsEntered' table. After that I run a Delete query to clear the 'DoNotDelete' table for next time.
The problem is that 'CallsEntered' table is updating the 'DoNotDelete' table.

I know this is simple, but I've done what the "manuals" say to (as far as I can tell). Your time is appreciated.

UPDATE DoNotDelete INNER JOIN CallsEntered ON DoNotDelete.[Work Order Nbr] = CallsEntered.[Work Order Nbr] SET CallsEntered.[Wo Status] = CallsEntered![Wo Status], DoNotDelete.[Date CheckIn] = CallsEntered![Date CheckIn], DoNotDelete.[Assigned Installer] = CallsEntered![Assigned Installer];

View 1 Replies View Related

New To Access, Update Querry Issue

Jan 22, 2007

Hi,

I'm new to access (wiz at excel) and I'm having a problem updating some records. I have table named "Updated 01-22-07". Within that file I'm trying to updated the Shipper_Name field. The file I'm looking to update it from is called "Party City Offical Vendor List 01-22-07".

The common thread in both files is the Vendor #. Where the vendor # is the same I would like the Shipper_Name field in "Updated 01-22-07" to up to the data in the Vendor Name fileld of table "Party City Offical Vendor List of 01-22-07".

I have banged around several queries and can't seem to get it to work. Any thoughts?

Thank in advance for your help.

Eddie.

View 3 Replies View Related

MYSQL -&gt; Access (update Query)

Oct 17, 2007

I'm new to access and I'm trying to learn the functionality by creating a relational DB for US zip codes from an excel document. I've imported everything and I have the tables setup. Is there a way to run a MYSQL query like this:

UPDATE tbllocation, tblzipcode SET tbllocation.ZipID = tblzipcode.ZipID WHERE tbllocation.ZipID = tblzipcode.ZipCode;

in access 2007?

Thanks

View 2 Replies View Related

Update Query Access 2007

Apr 17, 2008

I have summarized a table(a) of 589 records into a table of 119 records(b).

I am trying to calculate a factor in (a) as a percentage of the total in (b) for each record in (a).

(a) can have multiple records for each corresponding, summarized record in (b).

I do this by dividing each of the many records in (a) by a summarized record in (b) with a common field in both.

Basically, I am dividing

Round(([(a)]![netchrg] / [(b)]![netchrg]),8)

All I get is 0.00000000

I have checked my join relationships.
I started by checking the 2nd bubble. It did not work. Eventually, I have tried selecting all three bubbles on the joins and that does not get me any different values.

I would have thought that the 2nd bubble would have given me all of (a) and match it to the the records is (b) for the calculation.

I have even tried eliminating the joins completely but I still get a 0 value.

I have verified that both tables have values in the netchrg field.

Suggestions?

Thanks.

View 3 Replies View Related

Trying To Use A Formula In Access To Update A Table

Jan 22, 2005

I have a form that has 3 fields each representing a different table. I want the sum of 2 of the fields to update the third field. The third table has an existing value in it, but I need it to change when the formula is executed. I have a formula embedded in the form and can make the formula work, but it doesn't update my table. How can I make it do this? :confused:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved