Rabu, 16 Maret 2016

Re: [MS_AccessPros] Working with recordset with SQL back end

 

John,


I think I need to put "+ dbSeeChanges" after "dbAppendOnly"


Then, I get an error Invalid use of Null on

    tID = rst![ParentID]


rst![ParentID] evaluates to null


Adam

---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Adam-

I don't see anything you need to change if you're using linked tables to SQL Server.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Mar 16, 2016, at 8:43 PM, runuphillracing@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

How do I change the following code to work with a SQL back end (as opposed to an accdb BE)?


    Set Db = DBEngine(0)(0)
    Set rst = Db.OpenRecordset("tblParentListBE", dbOpenDynaset, dbAppendOnly)
    rst.AddNew
    rst![ParentName] = Me.ClientName
    tID = rst![ParentID]
    rst.Update
    rst.Close
    Set rst = Nothing


Thanks

Adam




__._,_.___

Posted by: runuphillracing@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Save time and get your email on the go with the Yahoo Mail App
Get the beautifully designed, lighting fast, and easy-to-use, Yahoo Mail app today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar