473,796 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A97 Q on OpenRecordset syntax...

MLH
Set rstOtherTable = MyDB.OpenRecord set(xxx, dbOpenDynaset)

I have a question regarding syntax of the above OpenRecordset method:
Is it OK for xxx to reference both tables and queries when using
dbOpenDynaset?

And how about these 2 lines together - is the code structure OK?
xxx = "SELECT tblLienHolders. LienHolderID FROM tblLienHolders; "
Set rstOtherTable = MyDB.OpenRecord set(xxx, dbOpenDynaset)
Apr 11 '06 #1
2 1924
No problem.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CR**@NorthStat e.net> wrote in message
news:49******** *************** *********@4ax.c om...
Set rstOtherTable = MyDB.OpenRecord set(xxx, dbOpenDynaset)

I have a question regarding syntax of the above OpenRecordset method:
Is it OK for xxx to reference both tables and queries when using
dbOpenDynaset?

And how about these 2 lines together - is the code structure OK?
xxx = "SELECT tblLienHolders. LienHolderID FROM tblLienHolders; "
Set rstOtherTable = MyDB.OpenRecord set(xxx, dbOpenDynaset)

Apr 11 '06 #2
MLH
Thx.
Apr 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
17876
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 linked tables, and my codes is as follows: Set vRS = CurrentDb.OpenRecordset(tbl_DataCommentLog) when this line is executed I get the error: "Run-time error '3622':
9
5388
by: MLH | last post by:
A runtime error 13 (type mismatch) occurs running the following line: Set rst = dbs.OpenRecordset("tblMyTable", dbOpenTable) What would be the most likely place I would find the source of the error? The DAO code lines providing dependencies to this one are... Dim dbs As Database, rst as RecordSet Set dbs = CurrentDb
0
5384
by: mo. | last post by:
I need some help in accessing Jet database using DAO. I have just started to learn c# and am trying to rewrite a program I have in vb.net to c#. In VB.Net I can do this: Dim ws As DAO.Workspace Dim db As DAO.Database ws = DAODBEngine_definst.Workspaces(0) db = ws.OpenDatabase(DBFileName) Dim rs As DAO.Recordset
1
1645
by: MLH | last post by:
When the following runs, I get error saying "Jet can't find input table/query qdfMarkedAddnlOwnerRecs" The error occurs in line #150 Sub cmdSaveVehicleRec_Click() frmVehicleEntryForm. 120 Set MyDB = CurrentDb ' Set MyDB = OpenDatabase("Northwind.mdb") is alternate syntax. 140 With MyDB 149 Set qdfMarkedAddnlOwnerRecs = ..CreateQueryDef("NewQueryDef", "Select * From tblAddnlOwners Where =True;")
18
5096
by: Shawn Yates | last post by:
I have a report that looks up the earliest start time in a query . Right now it opens up the query and grabs the earliest start date like it should. This is the working code: Set rs = db.OpenRecordset("SELECT Min() AS MinOfStartTime " _ & " FROM Assignments", dbOpenSnapshot) The problem is that this query is showing start and finish times from different events. Is there a way to have it grab the earliest start
6
5269
by: SpankyTClown | last post by:
I am trying to copy a record with child records. The process is to copy the parent and then search the child tables for record related to the parent. When I try to search the child table for all related records I get the following error: Syntax error (missing operator) in query expression 'Configuration Id=28"' I have shown the code below, any help would be appreciated. ...
10
3742
by: MLH | last post by:
Gentlemen: I am having one heck of a time taking a DAO walk through the records in an SQL dynaset. I'm trying to walk a set of records returned by a UNION query. I'm attempting to filter the records to those related to vehicle #60 ( = 60 ). If I explicitly specify 60 in the SQL ==everything works fine. Take a look: 100 PString = "SELECT & " & Chr$(&H22) & Space(1) & Chr$(&H22) & " & AS Recipient " 120 PString = PString & "FROM...
22
10297
by: MLH | last post by:
100 Dim db As Database, rst As Recordset 120 Set db = CurrentDb 140 PString = "SELECT qryBatchList.ReadyFor906, qryBatchList.BatchID FROM qryBatchList WHERE qryBatchList.BatchID=GetCurrentBatchID()" 160 Set rst = db.OpenRecordset(PString, dbOpenDynaset) At compile time, things are OK. But at run time, line #160 gives rise to an error saying some FN I've used for years is undefined. It almost seems like it pukes on some random
7
11059
by: mirandacascade | last post by:
The questions are toward the bottom of this post. Situation is this: 1) Access 97 2) Multi-user appplication 3) SQL Server 2000 4) Sporadically (i.e. less than 1% of the time) encounter the following error: 3218 Couldn't update; currently locked
0
9524
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
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
10168
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
9047
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
7546
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
6785
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
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
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.