Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn off confirmation messages on append queries 1

Status
Not open for further replies.

balllian

MIS
Jan 26, 2005
150
GB
HELP!!

I have updated my database with the facility to stop confirmation messages appearing when i run append queries without any problems.

the problem arises when another person loads the same database up the chnages i have set up via

Tools/options/edit_find dont appear on the database they have opened. What is going on here. The database is on a shared directory and everyone is on the same permissions within this folder.

Has anyone experienced this problem before???
 
Those changes only affect the local installation of Access, not the specific database. You will have to make that change on all computers that are going to run the database.

The other option is if you are calling the append query in code, you can turn off the warnings before you run it.

DoCmd.SetWarnings False

If you want to turn them back on after you run the query

DoCmd.SetWarnings True
 
Ive converted the macro into VB. where would i need to place 'DoCmd.setwarnings false' and DoCmd.SetWarnings true'

Private Sub Command552_Click()
Dim i As Double
Dim ReturnValue As Variant
Dim maxvalue As Double
Dim stepp As Double
Dim X As Variant
Dim Total As Double

maxvalue = 700000
stepp = 100 / maxvalue

ReturnValue = SysCmd(SYSCMD_INITMETER, "Building query", 100)

Response = MsgBox("This may take some time." _
& Chr(10) & Chr(13) & "Push OK to continue, and Cancel to quit", 1)
If Response = 1 Then
DoCmd.Hourglass True
For i = 1 To maxvalue
Total = Total + stepp
X = Int(Total)
ReturnValue = SysCmd(SYSCMD_UPDATEMETER, X)
Next i
DoCmd.Hourglass False
DoCmd.OpenrReport ("RSales_breakdown_daily")
End If

ReturnValue = SysCmd(SYSCMD_SETSTATUS, "Updating report")
ReturnValue = SysCmd(SYSCMD_REMOVEMETER)

End Sub


End Sub
 
Please ignore the above VB code. I have added the wrong bit.

Apologies.

Private Sub Command686_Click()

' start message
Beep
MsgBox "You are about to run the IFA report ", vbOKOnly, ""
' delete query
DoCmd.OpenQuery "QIFA_category_delete", acNormal, acEdit
' append query
DoCmd.OpenQuery "QIFA_category_listing", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_category_listing"
DoCmd.OpenQuery "QIFA_cat_holdings", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_cat_holdings"
DoCmd.OpenQuery "QIFA_categorisation_reps", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_categorisation_reps"
DoCmd.OpenQuery "QIFA_cat_totals_1", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_cat_totals_1"
DoCmd.OpenQuery "QIFA_cat_totals_2", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_cat_totals_2"
DoCmd.OpenQuery "Query45", acNormal, acEdit
DoCmd.Close acQuery, "Query45"
' delete query
DoCmd.OpenQuery "Query49", acNormal, acEdit
' append query
DoCmd.OpenQuery "Query46", acNormal, acEdit
DoCmd.Close acQuery, "Query49"
' opens data from TIFA_select_totals
DoCmd.OpenQuery "QIFA_select_totals_05", acNormal, acEdit
DoCmd.Close acQuery, "QIFA_select_totals_05"
' Confirmation message
Beep
MsgBox "The report is about to be displayed", vbExclamation, "IFA Categoisation report"
' opens final report
DoCmd.OpenReport "RIFA_select_totals_05", acPreview, "", ""

End Sub
 
To turn off the warning messages, the line before 'Beep', you would put:

DoCmd.SetWarnings False

To turn the warning messages back on, the line after 'DoCmd.OpenReport "RIFA_select_totals_05", acPreview, "", ""', you would put

DoCmd.SetWarnings True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top