Changes aren't display in the navigation pane

odrap

Registered User.
Local time
Today, 16:11
Joined
Dec 16, 2008
Messages
156
For backingup purposes i use the following code that's works fine.
However, after running the code, the new table isn't display in the navigation pane. I have to press the functonkey F5 to get it done.
I added the code : SendKeys "{F5}" but that didn't help.
What can i do to see the table in the navigation pane after running the code, without the need to press F5

Dim Naam As string
Dim strSQl As string
Naam = "tblOrders"

strSql1 = "SELECT tblOrderdetails.*,* INTO " & naam1 & " FROM tblOrderdetails WHERE (Right$([OrderID],2)= """ & Right$(Year(Now()), 2) & """" & ")" & ";"

On Error Resume Next
db.QueryDefs.Delete ("qMakeBackups")
On Error GoTo 0

Set qdf = db.CreateQueryDef("qMakeBackups", strSql1)
qdf.Execute
 
You can select the object like this...
Code:
DoCmd.SelectObject acTable, "tSomeTable", True
 
I like to thank you for the help
 

Users who are viewing this thread

Back
Top Bottom