Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Access VB Append Query Probs
Closed Thread
Old 08-29-2005, 02:10 PM   #1 (permalink)
 
Newb Techie

Join Date: Jun 2005

Posts: 21

lord nikon007

Send a message via AIM to lord nikon007
Default Access VB Append Query Probs

I want this append query to run everytime the return button is pressed but i keep getting an error saying this is an invalid action. the query runs fine. the heck is wrong?

Private Sub cmdReturn_Click()

Dim dbs As Database
Dim rstApp As DAO.Recordset

'***** This runs the Append query to add the new records
'***** to the projects list before returning to the switchboard.
Set dbs = CurrentDb
Set rstApp = dbs.OpenRecordset("qryAppend", dbOpenDynaset)

'***** This closes the form without submitting
'***** the records to the table.

rstApp.Close
dbs.Close
DoCmd.Close

End Sub
lord nikon007 is offline  
Old 08-29-2005, 03:03 PM   #2 (permalink)
 
Newb Techie

Join Date: Jun 2005

Posts: 21

lord nikon007

Send a message via AIM to lord nikon007
Default

ok....solved that problem on my own so forget that...new question

....once you hit the return to switchboard button after the append query runs i want the records entered to show up but they wont unless you restart the entire database. is there a command that will instantly return the latest records without me having to restart the database?
lord nikon007 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On