Kamis, 31 Agustus 2017

Re: [MS_AccessPros] Missing Data in SQL Servier backend

 

John,

for kicks and giggles I added a join in the Relationships diagram tool in Access today after the failed attempt..  1 to many

Yes it is a subform on a form.
frmTasks is the main form
sfrmTaskDetails is the subform

The code behind the button that adds the record

Private Sub cmdTableTransfer_Click()

Rank.Value = "A"
Me.cboTaskType = 10
Me.cboTaskName = "Transfer Copy Process"
TaskTitle.Value = "Table Transfer"
TaskDescription.Value = "Table Transfer and Copy Processes for all Databases"
Me.cboDepartment = 33
DueDate.Value = Date
Me.ColorOfRecord = "vbRed"
CompletedDate.Value = Date
StatusType.Value = "Completed"
DoCmd.Save
Me.sfrmTaskDetails.Form!TaskUpdateDate = Date
Me.sfrmTaskDetails.Form!TimeSpent = 1
Me.sfrmTaskDetails.Form!TaskUpdate = "Used PeopleSoft Datawarehouse Database to transfer all needed tables and to copy into all working Databases. Also Processed the Repurpose Database objects."
Me.sfrmTaskDetails.Form!TaskID = Forms!frmTasks!TaskID
Me.Refresh
DoCmd.Save
cmdOpenqryTodayTasksTimeSpent.SetFocus

End Sub


the link  master TaskID

the link Chidl    Taskid



Jim Wagner



On ‎Thursday‎, ‎August‎ ‎31‎, ‎2017‎ ‎08‎:‎42‎:‎46‎ ‎AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Jim-


I would need to see any code you have in the form(s) you're using to enter the data.  Is this a form with a subform?

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




On Aug 31, 2017, at 5:27 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



John,

I added the save command and it did no help.


TaskId is an Autonumber in the tblTasks table

TaskDetailsID is an autonumber in the tblTaskDetails table
TaskID is a number in the tblTaskDetails table.

My frustration is that I can manually add the data for the task and the fields populate correctly. But when I run the procedure, it fails.

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎10‎:‎14‎:‎18‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Thank You John, I added a save command to save the record. I do not want to mess up the sync of the numbers in the parallel databases so I will wait until tomorrow to see if it works. I will let you know. 

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎09‎:‎00‎:‎04‎ ‎AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Jim-

If "TaskID" is an "autonumber," that's the problem.  When you "dirty" a new row that has an Autonumber in Access, Access immediately sets the next value.  When the table is in SQL Server, however, SQL Server doesn't generate the number until after you save the row.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Aug 7, 2017, at 10:19, luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


Hello all,


I run a parallel Tasks local database and a SQL backend to Access database. On the databases I have a main form and a linked sub form. Every morning I run a process to get outside data into the database. Because I do it every day I have a button that populates fields in the form so I do not have to type them. This button works great on the local database but the SQL backend I am missing the data in the field that the forms are linked on the following below. If I add a new record by typing all of the fields I have no issues. But the populated process seems to miss the linked field. Every day I need to go to the table and add the Task ID from the main table to the table for the subform.

Is this a SQL issue or should I add the Taskid field to the vba process?


the link  master TaskID

the link Chidl    Taskid


the process


Private Sub cmdTableTransfer_Click()

Rank.Value = "A"
Me.cboTaskType = 10
Me.cboTaskName = "Transfer Copy Process"
TaskTitle.Value = "Table Transfer"
TaskDescription.Value = "Table Transfer and Copy Processes for all Databases"
Me.cboDepartment = 33
DueDate.Value = Date
Me.ColorOfRecord = "vbRed"
CompletedDate.Value = Date
StatusType.Value = "Completed"
Me.sfrmTaskDetails.Form!TaskUpdateDate = Date
Me.sfrmTaskDetails.Form!TimeSpent = 1
Me.sfrmTaskDetails.Form!TaskUpdate = "Used PeopleSoft Datawarehouse Database to transfer all needed tables and to copy into all working Databases. Also Processed the Repurpose Database objects."
Me.Refresh
cmdOpenqryTodayTasksTimeSpent.SetFocus

End Sub


Thank You for any advice. I am trying to learn SQL by creating the SQL backend scenario.


Jim Wagner




__._,_.___

Posted by: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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.


.

__,_._,___

Re: [MS_AccessPros] Missing Data in SQL Servier backend

 

Jim-


I would need to see any code you have in the form(s) you're using to enter the data.  Is this a form with a subform?

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




On Aug 31, 2017, at 5:27 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



John,

I added the save command and it did no help.


TaskId is an Autonumber in the tblTasks table

TaskDetailsID is an autonumber in the tblTaskDetails table
TaskID is a number in the tblTaskDetails table.

My frustration is that I can manually add the data for the task and the fields populate correctly. But when I run the procedure, it fails.

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎10‎:‎14‎:‎18‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Thank You John, I added a save command to save the record. I do not want to mess up the sync of the numbers in the parallel databases so I will wait until tomorrow to see if it works. I will let you know. 

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎09‎:‎00‎:‎04‎ ‎AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Jim-

If "TaskID" is an "autonumber," that's the problem.  When you "dirty" a new row that has an Autonumber in Access, Access immediately sets the next value.  When the table is in SQL Server, however, SQL Server doesn't generate the number until after you save the row.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Aug 7, 2017, at 10:19, luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


Hello all,


I run a parallel Tasks local database and a SQL backend to Access database. On the databases I have a main form and a linked sub form. Every morning I run a process to get outside data into the database. Because I do it every day I have a button that populates fields in the form so I do not have to type them. This button works great on the local database but the SQL backend I am missing the data in the field that the forms are linked on the following below. If I add a new record by typing all of the fields I have no issues. But the populated process seems to miss the linked field. Every day I need to go to the table and add the Task ID from the main table to the table for the subform.

Is this a SQL issue or should I add the Taskid field to the vba process?


the link  master TaskID

the link Chidl    Taskid


the process


Private Sub cmdTableTransfer_Click()

Rank.Value = "A"
Me.cboTaskType = 10
Me.cboTaskName = "Transfer Copy Process"
TaskTitle.Value = "Table Transfer"
TaskDescription.Value = "Table Transfer and Copy Processes for all Databases"
Me.cboDepartment = 33
DueDate.Value = Date
Me.ColorOfRecord = "vbRed"
CompletedDate.Value = Date
StatusType.Value = "Completed"
Me.sfrmTaskDetails.Form!TaskUpdateDate = Date
Me.sfrmTaskDetails.Form!TimeSpent = 1
Me.sfrmTaskDetails.Form!TaskUpdate = "Used PeopleSoft Datawarehouse Database to transfer all needed tables and to copy into all working Databases. Also Processed the Repurpose Database objects."
Me.Refresh
cmdOpenqryTodayTasksTimeSpent.SetFocus

End Sub


Thank You for any advice. I am trying to learn SQL by creating the SQL backend scenario.


Jim Wagner




__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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.


.

__,_._,___

Re: [MS_AccessPros] Missing Data in SQL Servier backend

 

John,

I added the save command and it did no help.


TaskId is an Autonumber in the tblTasks table

TaskDetailsID is an autonumber in the tblTaskDetails table
TaskID is a number in the tblTaskDetails table.

My frustration is that I can manually add the data for the task and the fields populate correctly. But when I run the procedure, it fails.

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎10‎:‎14‎:‎18‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Thank You John, I added a save command to save the record. I do not want to mess up the sync of the numbers in the parallel databases so I will wait until tomorrow to see if it works. I will let you know.

Jim Wagner



On ‎Monday‎, ‎August‎ ‎07‎, ‎2017‎ ‎09‎:‎00‎:‎04‎ ‎AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Jim-

If "TaskID" is an "autonumber," that's the problem.  When you "dirty" a new row that has an Autonumber in Access, Access immediately sets the next value.  When the table is in SQL Server, however, SQL Server doesn't generate the number until after you save the row.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Aug 7, 2017, at 10:19, luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hello all,


I run a parallel Tasks local database and a SQL backend to Access database. On the databases I have a main form and a linked sub form. Every morning I run a process to get outside data into the database. Because I do it every day I have a button that populates fields in the form so I do not have to type them. This button works great on the local database but the SQL backend I am missing the data in the field that the forms are linked on the following below. If I add a new record by typing all of the fields I have no issues. But the populated process seems to miss the linked field. Every day I need to go to the table and add the Task ID from the main table to the table for the subform.

Is this a SQL issue or should I add the Taskid field to the vba process?


the link  master TaskID

the link Chidl    Taskid


the process


Private Sub cmdTableTransfer_Click()

Rank.Value = "A"
Me.cboTaskType = 10
Me.cboTaskName = "Transfer Copy Process"
TaskTitle.Value = "Table Transfer"
TaskDescription.Value = "Table Transfer and Copy Processes for all Databases"
Me.cboDepartment = 33
DueDate.Value = Date
Me.ColorOfRecord = "vbRed"
CompletedDate.Value = Date
StatusType.Value = "Completed"
Me.sfrmTaskDetails.Form!TaskUpdateDate = Date
Me.sfrmTaskDetails.Form!TimeSpent = 1
Me.sfrmTaskDetails.Form!TaskUpdate = "Used PeopleSoft Datawarehouse Database to transfer all needed tables and to copy into all working Databases. Also Processed the Repurpose Database objects."
Me.Refresh
cmdOpenqryTodayTasksTimeSpent.SetFocus

End Sub


Thank You for any advice. I am trying to learn SQL by creating the SQL backend scenario.


Jim Wagner

__._,_.___

Posted by: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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.


.

__,_._,___

Re: [MS_AccessPros] Redesign question for mutiple quries in a macro

 

Crystal,

The process creates multiple tables to get data to redefine it from multiple tables. I did not create the macros and really have not delved into the process very much. Since my boss retired, I am on my own and I seem to be all over the place with projects and tasks that she always dealt with.

The process has several queries that get Max Dates and Max Sequences tables. Those tables are used elsewhere in the other queries. Several queries pull from employee History data and several pull from current employee data.

Jim Wagner



On ‎Wednesday‎, ‎August‎ ‎30‎, ‎2017‎ ‎03‎:‎35‎:‎46‎ ‎PM, crystal 8 strive4peace2008@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

hi Jim,

if records are being deleted and created, these temporary tables should not be in the front-end, or in a back-end with important data -- they should be in a place where the file can be deleted and recreated by code.

Perhaps, however, the process does not need to be calculated like that. What does it do?

Bosses don't usually know best.  Good luck with that.

respectfully,
crystal
 
~ have an awesome day ~

On 8/30/17 1:22 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] wrote:
Crystal,

You are going to laugh at this.

Right now it is in a back end database and the final table is linked in the database to the backend. But for some reason after years of getting a database with all of these types of processes my boss wants it back in the databases. There are 3 databases with the same final table for various different users. I am so frustrated right now. It is crazy to think that we are going backwards. This kind of stuff is the reason my boss retired early. Eventually we will all be using stone tablets.

Jim Wagner



On ‎Wednesday‎, ‎August‎ ‎30‎, ‎2017‎ ‎11‎:‎02‎:‎08‎ ‎AM, crystal 8 strive4peace2008@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

hi Jim,

' instead of bloating the FE with temporary tables,
'     make another BE and link to its tables.

'~~~~
Function CreateADatabase(psDatabaseName As String) As String
's4p
   'RETURN
   '  path and filename of created database
   'CALLS
   '  GetDatabaseName
  
   CreateADatabase = ""
  
   Dim sPathFileDatabase As String

   sPathFileDatabase = GetDatabaseName(psDatabaseName)
  
   '---------------------- create a new database

   'make a blank database
   DBEngine.CreateDatabase sPathFileDatabase, dbLangGeneral
  
   CreateADatabase = sPathFileDatabase
  
End Function

'~~~~
Function GetDatabaseName(psDatabaseName As String) As String
's4p
   'RETURN
   '  path\file of a specified database name
  
   Dim sPathFileDatabase As String
  
   If InStr(psDatabaseName, "\") > 0 Then
      'if path was specified, use it
      sPathFileDatabase = psDatabaseName
   Else
      'if no path specified, put database in current path
      sPathFileDatabase = CurrentProject.Path & "\" & psDatabaseName
   End If
  
   'add extension if not specified
   If Right(sPathFileDatabase, 6) <> ".accdb" Then
      sPathFileDatabase = sPathFileDatabase & ".accdb"
   End If

   GetDatabaseName = sPathFileDatabase

End Function

'~~~~
Function Link2TableOtherDatabase(psDatabaseName As String _
   , psTablename As String)
's4p
'When you are using Make Table and Append queries,
'use the optional IN clause to specify the path and filename of an external database.
'Then use this procedure to link to the table

   'CALLS
   '  GetDatabaseName
   '  DropTheTable
  
   Dim sPathFileDatabase As String

   Dim db As DAO.Database _
      , tdf As DAO.TableDef

   sPathFileDatabase = GetDatabaseName(psDatabaseName)

   'set db to be the current database
   Set db = CurrentDb

   'if table is already in the current database, delete it
   Call DropTheTable(psTablename)

   'link to table
   With db
      Set tdf = .CreateTableDef(psTablename)
      tdf.Connect = ";Database=" & sPathFileDatabase
      tdf.SourceTableName = psTablename
      .TableDefs.Append tdf
      .TableDefs.Refresh
   End With

   'release object variables
   Set tdf = Nothing
   Set db = Nothing
End Function

'~~~~
Sub DropTheTable( _
   sTablename As String _
   , Optional pdb As DAO.Database _
   )
's4p
'Delete a table
'if the table is not there to delete, no error is returned
'another database may be passed

    Dim sName As String
    Dim db As DAO.Database
  
    On Error GoTo Proc_Err
   
    If pdb Is Nothing Then
      Set db = CurrentDb
   Else
      Set db = pdb
   End If
  
    'See if the table is there
    sName = db.TableDefs(sTablename).Name
  
    'If no error then table is there -- delete it
    With db
      .Execute "DROP TABLE [" & sTablename & "];"
      .TableDefs.Refresh
   End With
   DoEvents
  
Proc_Exit:
   On Error Resume Next
    Exit Sub
  
Proc_Err:

    Select Case Err.Number
      Case 3265 'Table does not exist
      Case Else
         MsgBox Err.Description, , _
           "ERROR " & Err.Number _
           & "   DropTheTable"
   End Select
  
   Resume Proc_Exit
   Resume
  
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~

respectfully,
crystal
 
~ have an awesome day ~


On 8/30/17 11:50 AM, luvmymelody@yahoo.com [MS_Access_Professionals] wrote:

Hello all,


I recently by this group was told to stop running macros for multiple action queries and use VBA. Also I was told to stop running Make Table Queries. So I converted several macros to the preferred VBA code such as


 dbs.Execute "qry_balancethruabovedate", dbFailOnError


So I have been asked to move 2 macros to a new database. Moving forward, I decided to use my new knowledge of these new practices. But one of the macros with queries has an interesting situation I am not sure how to proceed and need some advice.


I have a series of 8 queries in succession that are make table queries. With each make table query the next query uses the previous table created. Then after the 8 make table queries a delete query runs to empty the final table. Then 2 append queries run to append records from 2 of the tables created from the 8 queries to the final table.


These macros were created long ago by my boss who is now retired for which I am now tired. Should I follow the advice from this forum and create delete queries and then append queries through out the entire process? Will this take longer to process if I do that? Or is there a shorter more efficient way of doing this craziness?


Thank You

Jim Wagner



__._,_.___

Posted by: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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.


.

__,_._,___

Rabu, 30 Agustus 2017

Re: [MS_AccessPros] Redesign question for mutiple quries in a macro

 

hi Jim,

if records are being deleted and created, these temporary tables should not be in the front-end, or in a back-end with important data -- they should be in a place where the file can be deleted and recreated by code.

Perhaps, however, the process does not need to be calculated like that. What does it do?

Bosses don't usually know best.  Good luck with that.

respectfully,
crystal
 
~ have an awesome day ~

On 8/30/17 1:22 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] wrote:
Crystal,

You are going to laugh at this.

Right now it is in a back end database and the final table is linked in the database to the backend. But for some reason after years of getting a database with all of these types of processes my boss wants it back in the databases. There are 3 databases with the same final table for various different users. I am so frustrated right now. It is crazy to think that we are going backwards. This kind of stuff is the reason my boss retired early. Eventually we will all be using stone tablets.

Jim Wagner



On ‎Wednesday‎, ‎August‎ ‎30‎, ‎2017‎ ‎11‎:‎02‎:‎08‎ ‎AM, crystal 8 strive4peace2008@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

hi Jim,

' instead of bloating the FE with temporary tables,
'     make another BE and link to its tables.

'~~~~
Function CreateADatabase(psDatabaseName As String) As String
's4p
   'RETURN
   '  path and filename of created database
   'CALLS
   '  GetDatabaseName
  
   CreateADatabase = ""
  
   Dim sPathFileDatabase As String

   sPathFileDatabase = GetDatabaseName(psDatabaseName)
  
   '---------------------- create a new database

   'make a blank database
   DBEngine.CreateDatabase sPathFileDatabase, dbLangGeneral
  
   CreateADatabase = sPathFileDatabase
  
End Function

'~~~~
Function GetDatabaseName(psDatabaseName As String) As String
's4p
   'RETURN
   '  path\file of a specified database name
  
   Dim sPathFileDatabase As String
  
   If InStr(psDatabaseName, "\") > 0 Then
      'if path was specified, use it
      sPathFileDatabase = psDatabaseName
   Else
      'if no path specified, put database in current path
      sPathFileDatabase = CurrentProject.Path & "\" & psDatabaseName
   End If
  
   'add extension if not specified
   If Right(sPathFileDatabase, 6) <> ".accdb" Then
      sPathFileDatabase = sPathFileDatabase & ".accdb"
   End If

   GetDatabaseName = sPathFileDatabase

End Function

'~~~~
Function Link2TableOtherDatabase(psDatabaseName As String _
   , psTablename As String)
's4p
'When you are using Make Table and Append queries,
'use the optional IN clause to specify the path and filename of an external database.
'Then use this procedure to link to the table

   'CALLS
   '  GetDatabaseName
   '  DropTheTable
  
   Dim sPathFileDatabase As String

   Dim db As DAO.Database _
      , tdf As DAO.TableDef

   sPathFileDatabase = GetDatabaseName(psDatabaseName)

   'set db to be the current database
   Set db = CurrentDb

   'if table is already in the current database, delete it
   Call DropTheTable(psTablename)

   'link to table
   With db
      Set tdf = .CreateTableDef(psTablename)
      tdf.Connect = ";Database=" & sPathFileDatabase
      tdf.SourceTableName = psTablename
      .TableDefs.Append tdf
      .TableDefs.Refresh
   End With

   'release object variables
   Set tdf = Nothing
   Set db = Nothing
End Function

'~~~~
Sub DropTheTable( _
   sTablename As String _
   , Optional pdb As DAO.Database _
   )
's4p
'Delete a table
'if the table is not there to delete, no error is returned
'another database may be passed

    Dim sName As String
    Dim db As DAO.Database
  
    On Error GoTo Proc_Err
   
    If pdb Is Nothing Then
      Set db = CurrentDb
   Else
      Set db = pdb
   End If
  
    'See if the table is there
    sName = db.TableDefs(sTablename).Name
  
    'If no error then table is there -- delete it
    With db
      .Execute "DROP TABLE [" & sTablename & "];"
      .TableDefs.Refresh
   End With
   DoEvents
  
Proc_Exit:
   On Error Resume Next
    Exit Sub
  
Proc_Err:

    Select Case Err.Number
      Case 3265 'Table does not exist
      Case Else
         MsgBox Err.Description, , _
           "ERROR " & Err.Number _
           & "   DropTheTable"
   End Select
  
   Resume Proc_Exit
   Resume
  
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~

respectfully,
crystal
 
~ have an awesome day ~


On 8/30/17 11:50 AM, luvmymelody@yahoo.com [MS_Access_Professionals] wrote:

Hello all,


I recently by this group was told to stop running macros for multiple action queries and use VBA. Also I was told to stop running Make Table Queries. So I converted several macros to the preferred VBA code such as


 dbs.Execute "qry_balancethruabovedate", dbFailOnError


So I have been asked to move 2 macros to a new database. Moving forward, I decided to use my new knowledge of these new practices. But one of the macros with queries has an interesting situation I am not sure how to proceed and need some advice.


I have a series of 8 queries in succession that are make table queries. With each make table query the next query uses the previous table created. Then after the 8 make table queries a delete query runs to empty the final table. Then 2 append queries run to append records from 2 of the tables created from the 8 queries to the final table.


These macros were created long ago by my boss who is now retired for which I am now tired. Should I follow the advice from this forum and create delete queries and then append queries through out the entire process? Will this take longer to process if I do that? Or is there a shorter more efficient way of doing this craziness?


Thank You

Jim Wagner



__._,_.___

Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? 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.


.

__,_._,___