Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,472
    Provided Answers: 10

    Unanswered: Can this be Done Status Bar

    Have this Function which up the status by
    Code:
    Function StatusBar(Message)
     Dim RetVal As Variant
     RetVal = SysCmd(4, Message)
    End Function
    Is there a way to stop the status bar form showing the Run Query one

    I have this

    Code:
    DoCmd.SetWarnings False
    
    DoCmd.OpenQuery "Change to WETS"
    
    StatusBar "Wets Been Updated"
    
    DoCmd****nSQL "DELETE Label.txt2 FROM Label WHERE (((Label.txt2)=0));"
    
    StatusBar "0's been Deleted"
    
    DoCmd****nSQL "UPDATE (Truck RIGHT JOIN [Route-to-truck] ON Truck.TruckID = [Route-to-truck].TruckID) RIGHT JOIN Label ON [Route-to-truck].RouteName = Label.txt1 SET Label.TruckSort = [sorted];"
    
    StatusBar "Truck to Label Been Updated"
    
    DoCmd.SetWarnings True
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by myle View Post
    Have this Function which up the status by
    Code:
    Function StatusBar(Message)
     Dim RetVal As Variant
     RetVal = SysCmd(4, Message)
    End Function
    Is there a way to stop the status bar form showing the Run Query one

    I have this

    Code:
    DoCmd.SetWarnings False
    
    DoCmd.OpenQuery "Change to WETS"
    
    StatusBar "Wets Been Updated"
    
    DoCmd****nSQL "DELETE Label.txt2 FROM Label WHERE (((Label.txt2)=0));"
    
    StatusBar "0's been Deleted"
    
    DoCmd****nSQL "UPDATE (Truck RIGHT JOIN [Route-to-truck] ON Truck.TruckID = [Route-to-truck].TruckID) RIGHT JOIN Label ON [Route-to-truck].RouteName = Label.txt1 SET Label.TruckSort = [sorted];"
    
    StatusBar "Truck to Label Been Updated"
    
    DoCmd.SetWarnings True

    I assume that all your queries are action queries that do not have any form references as parameters.

    I would recommend using CurrentDB.Execute ... over Docmd RunSQL ... this way you do not have to turn off the warnings.


    Try:

    Code:
    CurrenDB.Execute "Change to WETS"
    
    
    StatusBar "Wets Been Updated"
    
    CurrenDB.Execute "DELETE Label.txt2 FROM Label WHERE (((Label.txt2)=0));"
    
    StatusBar "0's been Deleted"
    
    CurrenDB.Execute "UPDATE (Truck RIGHT JOIN [Route-to-truck] ON Truck.TruckID = [Route-to-truck].TruckID) RIGHT JOIN Label ON [Route-to-truck].RouteName = Label.txt1 SET Label.TruckSort = [sorted];"
    
    StatusBar "Truck to Label Been Updated"

    or

    Code:
    Application.Echo False
    
    CurrenDB.Execute "Change to WETS"
    
    StatusBar "Wets Been Updated"
    
    
    CurrenDB.Execute "DELETE Label.txt2 FROM Label WHERE (((Label.txt2)=0));"
    
    StatusBar "0's been Deleted"
    
    CurrenDB.Execute "UPDATE (Truck RIGHT JOIN [Route-to-truck] ON Truck.TruckID = [Route-to-truck].TruckID) RIGHT JOIN Label ON [Route-to-truck].RouteName = Label.txt1 SET Label.TruckSort = [sorted];"
    
    StatusBar "Truck to Label Been Updated"
    
    Application.Echo True
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •