473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Runtime Error 3622 you must use dbSeeChanges

2
Am Converting an Access 2000 database to SQL Express 2005. The Access database was divided into a backend (data) and front end (menus, queries, forms).
I am having problems with one of the forms, as the code which worked with Access is obviously wrong for sql.

specifically,
code as follows

Expand|Select|Wrap|Line Numbers
  1. If NewRecord=True Then
  2.  SectionName="Item Search code"
  3.  qry2="select top 1" &_
  4.           "DeceasedID, DateOfEntry from dbo_AllFields where "&_
  5.           "format(DateOfEntry, "yyyy-mm-dd"")='" & Format(DateOfEntry, "yyyy-mm-dd")&-
  6.           "'and DataEntryBy= '" & CurrentUser &_
  7.           "'and Dec_cn='" & Dec_cn &_
  8.           "'andFamilyna='" & Familyna & "'" & _
  9.           "order by DeceasedID desc"
  10.  
  11. Set rs = CurrentDb.openrecordset(qry2)
  12. mDeathID = rs!DeceasedID
  13. lblDeceasedID.Caption =mDeathID
  14. End If
I realise i need the dbseeChanges command on the set rs line, but i have tried numerous combinations with no success.

Please help.

thanks
Dec 5 '06 #1
3 8287
NeoPa
32,556 Expert Mod 16PB
Expand|Select|Wrap|Line Numbers
  1. If NewRecord Then
  2.  SectionName="Item Search code"
  3.  qry2="select top 1 " & _
  4.         "DeceasedID, DateOfEntry from dbo_AllFields where " & _
  5.         "format(DateOfEntry, 'yyyy-mm-dd')='" & Format(DateOfEntry, 'yyyy-mm-dd') & _
  6.         "' and DataEntryBy= '" & CurrentUser & _
  7.         "' and Dec_cn='" & Dec_cn & _
  8.         "' and Familyna='" & Familyna & _
  9.         "' order by DeceasedID desc"
  10.  
  11.  Set rs = CurrentDb.openrecordset(qry2)
  12.  mDeathID = rs!DeceasedID
  13.  lblDeceasedID.Caption =mDeathID
  14. End If
If you look through your code, or even look at qry2 before executing it, you'll see a fair number of typos where spaces are missing; (&) & (_) are used wrongly; etc.
I've updated the ones I noticed. With the code tags it's much easier to notice.
Dec 5 '06 #2
JenniU
2
Thank you i will make the changes and test again

Expand|Select|Wrap|Line Numbers
  1. If NewRecord Then
  2.  SectionName="Item Search code"
  3.  qry2="select top 1 " & _
  4.         "DeceasedID, DateOfEntry from dbo_AllFields where " & _
  5.         "format(DateOfEntry, 'yyyy-mm-dd')='" & Format(DateOfEntry, 'yyyy-mm-dd') & _
  6.         "' and DataEntryBy= '" & CurrentUser & _
  7.         "' and Dec_cn='" & Dec_cn & _
  8.         "' and Familyna='" & Familyna & _
  9.         "' order by DeceasedID desc"
  10.  
  11.  Set rs = CurrentDb.openrecordset(qry2)
  12.  mDeathID = rs!DeceasedID
  13.  lblDeceasedID.Caption =mDeathID
  14. End If
If you look through your code, or even look at qry2 before executing it, you'll see a fair number of typos where spaces are missing; (&) & (_) are used wrongly; etc.
I've updated the ones I noticed. With the code tags it's much easier to notice.
Dec 5 '06 #3
NeoPa
32,556 Expert Mod 16PB
No problem.
I'm happy to look again if you need me to, but try using Debug.Print qry2 to see exactly what it's trying to execute first.
You may find you see the problems yourself which can save you some time.
Dec 5 '06 #4

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

Similar topics

5
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived...
1
by: Mike S | last post by:
I am trying to find out what percentage of machines on my network have the ..NET runtime installed. What would be the best reccomendation for this (other than SMS)? Is using WSH & WMI an answer?...
5
by: Philippa | last post by:
I'm trying to access data in vba using the openrecordset command. The data in on a SQL Server 2000 database, and I have linked tables to that data. the Table I'm trying to access is one of these...
4
by: Stephen | last post by:
Hello People, Using MS Access 2003 VBA I get the error 3020 Update or CancelUpdate without AddNew or Edit when I run through the following code. Can anyone help suggest anything to try? Thanks....
2
by: Jimbo | last post by:
I have an access 97 database linked to sql server..I click update on a form and get an error message: Run-time error 3146 ODBC call failed The debugger points to this line: MyTable.Update
7
by: Jan | last post by:
Hi: When I searched the newsgroup for this problem, I saw two or three instances of the question being asked, but it was never answered. Not too promising, but here goes: I have a form with...
5
by: jmarcrum | last post by:
Hi everyone! I'm getting an error that I can't figure out...here's my code...i'm trying to reference the first sqlStatement from the second sqlStatement and run the second sqlStatement. Am I...
2
by: blogman | last post by:
I am getting a Visual studio 2008 IDE application R6034 runtime error. This means that the IDE application is raising the error not the application I am building. This means that Microsoft did not...
1
by: BL3WC | last post by:
Hi, I'd created a MDE under Access 2003. It is now under testing stage. Some of the users will use Access 2003 runtime and some will use Access 2007 runtime to run this MDE. I installed the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.