Msg Box Before Macro Start
Dec 14, 2005
Hello,
I have a button that runs a macro to delete records in 12 tables. I want to create a message box before that macro runs warning that you are deleting records in 12 tables and are your sure you want to run the macro.
I need a message box with an ok and cancel button. Where do I put the msgbox funtion in this code?
Thanks !!
This is my code:
Private Sub cmdRunDeleteMacro_Click()
On Error GoTo Err_cmdRunDeleteMacro_Click
Dim stDocName As String
stDocName = "mcrSemesterStartRecordDELETE"
DoCmd.RunMacro stDocName
Exit_cmdRunDeleteMacro_Click:
Exit Sub
Err_cmdRunDeleteMacro_Click:
MsgBox Err.Description
Resume Exit_cmdRunDeleteMacro_Click
End Sub
View Replies
ADVERTISEMENT
Dec 8, 2013
I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.
Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"
Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"
[code]....
View 1 Replies
View Related
Jun 14, 2012
I know that I can startup MS-Access manually and bypass the startup options, including any macro that is set to run automatically, by holding the Shift key down when launching the application. I have:
Code:
Public Sub AccessStuff()
Dim myaccess As New Access.Application
myaccess.OpenCurrentDatabase(" orfs006slsops_repts\_RS DevSOPSOP.MDB")
Dim db = myaccess.CurrentDb()
End Sub
which works nicely and opens the database just fine. However, this mdb has a startup macro defined in it. I can't hold down the Shift key since I'm doing this from a program. In this case, how can I bypass the startup macro?
View 7 Replies
View Related
Dec 19, 2007
This is my first project using Access so take it easy on me. I'm trying to convert the Excel application to Access since I think Access is more flexible/powerful. I'm not sure if this requires programming (VBA-over my head) or just need some complex formulas to get the mission accomplished.
The objective is to be able to copy and paste data from a customized form directly to Access. These data will automatically be added into a summary sheet based on volume and amount.
Thank you in advance.
AccessNewby
View 13 Replies
View Related
Feb 8, 2008
Im looking at creating a database which includes some sort of diary system but I havent got a clue where to start, how to structure the tables, etc.
I am new to our company so I am looking to streamline some of their processes. Basically there are 4 people in our department and at the moment we use Excel as a mini diary system for our work on a day to day basis (our company uses Lotus Notes not Outlook and the diary system is a load of cr*p, plus also I want to integrate this into a database I have already written for our developers). Going down the page we have a section for each week which contains 4 rows (1 for each person). There is then 5 columns in each section which represents Monday to Friday. Our office administrator then goes in each month and updates the dates manually for the entire month.
Do I need to have a row in my database for every day of the year or is it done in weeks? I did a search for Access diary threads but there doesnt seem to be much info and the example one on iSam seems to have been taken off :(
View 11 Replies
View Related
Dec 7, 2006
Hello all,
I am new to Access and I could really use some help to point me in the right direction. I want to organize my tables properly from the start so I do not run into problems down the road. If anyone can give me some advice on topics to read it would be a big help. Here is what I am doing so far.
My database must record warranty claims. A customer could have multiple warranty claims with multiple parts that failed. Each part can be linked to multiple failures but in a claim one part and one failure must be selected.
Example: A motor can fail in many ways but I need to know how it failed for this customer.
I would like to be able cascade the combo boxes so when a part is selected the failures related to that part are updated.
TblClients
ClientID AutoNum PK (1-many with tblMain)
CustomerName text
Address text
(rest of the customer data fields)
TblParts
PartID AutoNum Pk (1-Many with tblMain)
Part text
PartDescription text
TblFailure
FailureID AutoNum Pk (1-many with tblmain)
Failure text
FailureDescription text
TblMain
ClientID
PartID
FailureID
I guess my question is when I make a form based off TblMain, do I need a partfailure table to let me cascade my combo boxes?
Thanks for any help,
Mark
View 2 Replies
View Related
Jun 8, 2005
Is there a way to set where the different forms will start, like location wise on the screen, when they are loaded?
View 1 Replies
View Related
Jul 20, 2005
I've downloaded and installed the new SQL server 2005 express edition CTD (June ed.) along with the Express Manager.
How do i get an access database into SQL server?
Now that it's installed, what next? When i try to upsize, it asks me to choose a server, and gives 3 options, and i'm not sure where they come from. Where does this list come from? are they previous installations of the MSDE on my computer? are they servers that ar available over our LAN?
i read that the default name if an instance of SQL server express is SQLEXPRESS but that's not on the list...
do i need to create a new instance of SQL server on my computer to house the database?
I really just want to try it, to see if it's something we should do, but i can't get it to do anything at all. i don't know where to start...
I've done some searches, but nothing tells me where to start. I'm getting really frustrated with this....
Please help me...
View 2 Replies
View Related
Jun 12, 2006
Good day all. A bit of back ground, I've built a data base (with much help from the folks here) to track the training of my people. Someone way higher then me has decided to completely revamp our field training. There are now two "tiers" based on rank and training level. My first thought is to make two seperate tables for the information in each tier. What I would like to do is make the training specific to each tier show up on the form that I use to track this training based upon the persons rank. Ie an Airman would only show the tier one tasks and a Master Sergeant would show the tier two tasks. I'm thinking this could be done with a quiery but have no idea how to go about it. Any input or suggestions are welcome. Thanks in advance, Tim
View 6 Replies
View Related
Sep 5, 2006
Hi,
I unticked all the boxes in the Tools > start up window. I closed my database then reopened it. Now, I can't put these settings back again as I can't see the Tools tab.
Any help will be very much appreciated.
B
View 5 Replies
View Related
Apr 3, 2008
I have created one access application which will reside on server and many users will access it from there local PC. But whenever we start the application on local PC, it displays worning message that "Code is unsafe , it may harm your PC do you still want to run the code?" and another message box asking same question.
CAn we supress this worning? CAn we design the application in such a way that it will not ask such aquestions and will open application immidiatly when we double click the file.
Please reply ASAP. It's very much urgent...
View 3 Replies
View Related
Oct 4, 2005
Hi
This is probally really easy........
I have data with dates like 15/05/2005, 30/09/2005.
I need to convert the dates to 01/05/2005 and 01/09/2005
Can anyone help!
View 2 Replies
View Related
Jan 18, 2006
I have a query that is generating two colums, one the states the Start Date and the other that States the End Date. I need to display another column that displays the time difference between the two. Any ideas how?
View 10 Replies
View Related
Apr 20, 2006
How would you make two prompt boxes which ask for the start and end date so you can select all the data between the two dates...
[Start Date?] And [End Date?]
E.g., 01/01/2006 And 07/01/2006
So I can select all the data between that week. I also need to use this for the remaining weeks in January and February. This is really simple...gah. Thanks guys.
View 8 Replies
View Related
Oct 15, 2007
Hi All:given a table with, let's say, Job Numbers that start with a letter (such as RES2345) or just plain numbers (such as 253180001 or 9817) how can I set the criteria in the query to just give me jobs that start with a number?I first trimmed the field to eliminate blank characters and then I used the Not Like "A - Z" but it still gives me jobs with letters at the beginning of the name.thanks for all your help in advance. :D
View 1 Replies
View Related
Apr 23, 2008
In my db I have a password log-in for each user. During the log-in process, I have a query set to run:
Code:SELECT tblSetOut.LogNum, tblSetOut.WoNum, tblSetCont.SetContName, tblSetOut.OrdAssign, tblSetOut.WoStat, tblSetOut.ThirdParty, tblSetOut.DateIn, tblSetOut.DateOut, tblSetOut.ThirdTimeIn, tblSetOut.ThirdTimeOut, (DateDiff("n",[ThirdTimeIn],[ThirdTimeOut]))/60 AS [Release if Greater than 24]FROM tblSetCont INNER JOIN tblSetOut ON tblSetCont.SetContInitials = tblSetOut.SetContInitialsWHERE (((tblSetOut.WoStat) Not Like "released" & "*") AND ((tblSetOut.ThirdParty)=True));
It opens up in read-only form that the user can print or exit out of.
What I need to happen is for the query to run based on the user's log-in name. There are three tables involved (tblSetOut, tblSetCont, and tblSecurity). The tbl SetOut and tblSetCont are joined at the field SetContInitials. The tblSecurity (field SC_NAME) is joined to tblSetCont at SetContName.
For the life of me, I cannot figure out how to capture the log-in name to filter the query.
Thank you in advance
Camille
View 6 Replies
View Related
Jun 11, 2007
This may sound a bit silly, but my Access 2003 refuses to start.
I recently re-installed Office 2003 after a fresh installation of WinXP. Word, Excel etc work as normal. This is the message that comes up when I attempt to start Access:
"Please wait while Office 2003 Prof. Ed. configures. Required data is being determined"
after that nothing happens.
Any ideas?
Please note that I'm using the German versions of OS and Office. My translation probably doesn't match the original message.
Thanks in advance.
View 2 Replies
View Related
Nov 10, 2005
Hi
I want to use a batch file to start the DB. This will check if the Front End is on the users machine and if not copy it over.
It will then check what version of Access they are running and use the appropriate shortcut to open the Database.
This all works fine except that the Batch File does not close down until the Database is closed. Is there anyway to close the Batch File automatically while the database is running?
The Batch file I am using is
@echo off
rem *************************************
rem ** Batch file to copy FE **
rem *************************************
rem ** Copy Database **
if not exist "c:DB" md "c:DB"
if not exist "c:DBFE.mdb" copy "NetworkPathFE.mdb" "c:DBFE.mdb"
if exist "C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXE" goto Office10
if exist "C:Program FilesMicrosoft OfficeOffice11MSACCESS.EXE" goto Office11
if exist "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" goto Office
:Office10
"C:Program FilesMicrosoft OfficeOffice10MSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw"
goto End
:Office11
"C:Program FilesMicrosoft OfficeOffice11MSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw"
goto End
:Office
"C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "c:DBFE.mdb" /WRKGRP "NetworkPathSecured.mdw"
goto End
:End
Exit
Any ideas?
JC
View 4 Replies
View Related
Oct 20, 2006
I Have Chosen To Use Autonumber, But I Do Not Wish To Start From Number 1. I Wish To Start From 2345.
How Can I Do That?
View 2 Replies
View Related
Apr 13, 2007
*Can anyone tell me if or how to reffer to the options from Tools-->Startup in VBA code? I`m asking that because i want to open a database in different ways
taking in account the logged user.
*And another question: in access 2000 is possible to make .mde files? Because the option is dissabled in tools--> database utilities menu.
Many thanks,
bogdan
View 2 Replies
View Related
Sep 1, 2007
I have a database table which is basically a calendar containing 4 columns (i) the date, (ii) special info about that date, (iii) morning volunteers and (iv) afternoon volunteers.When I go to this table the cursor is positioned at the very first date and i then have to scroll though record after record to get to the current date.How can I get it to remember the last date used?I am using Vista and Access 2003
View 6 Replies
View Related
Mar 15, 2007
Hi
I have a start date on a form. The fields data type is short date I need to create a validation rule so that when a user enters a date it can only be a saturday date which is entered.
Thanks for your help
View 5 Replies
View Related
Jul 6, 2007
I have been testing data entry forms in a new database. Is there an easy way to reset the whole thing, autonumbers and all to new, as if nothing had ever been in the tables?
Thanks for your input.
View 9 Replies
View Related
Mar 22, 2007
I created a module to generate the correct date to begin manufacturing. There are two sets of criteria. If the job's prefinish is a certain code then manufacturing takes 7 days. If the job's door style is a certain code then manufacturing takes 5 to 6 days. Otherwise the date range is 4. Prefinish takes precedence over door style. I have units that have the special prefinish and one of the door styles listed then it gets the door style days instead of 7 days. Any ideas?
Function CreateWOSDDate(ByVal PreFin As String, ByVal DrStyle As String, ByVal DelDate As Date) As Date
Dim intNumDays As Integer
Select Case PreFin
Case "BR17", "BR28", "WH06", "BR06", "BR11", "WH17", "BR00", "BR22"
intNumDays = 7
Case Else
intNumDays = 4
End Select
Select Case DrStyle
Case "DCREag", "DCRHWK", "DCRFAL", "RP-9", "RP-22", "RP-23", "Eagle", "H/E", "F/E", "FALCON", "AR756", "HAWK", "RP22", "RP23", "RP9", "EAG", "HWK", "FALCN", "SHAKER", "NEVADA"
intNumDays = 6
Case "PAC"
intNumDays = 5
Case Else
intNumDays = 4
End Select
CreateWOSDDate = MinusWorkdays(DelDate, intNumDays)
End Function
View 5 Replies
View Related
Jul 26, 2007
I'm new in Databases and Access, so my problem is very simple.
I have a table with three fields: Name (Prim. Key), Start Date (Prim. Key) and Cost.
I want to obtain a query with this fields:
Name
Start Date
End Date (where the End Date would be one day before the next start date)
Cost
Thank you
View 1 Replies
View Related
Apr 7, 2008
Trying to compare start and end dates using a query so this is what i have but nothing is comming up wrong way to go about this? i need to do this for every month till 2012
Expr1: [Start Date]=[Start Date]>1/1/2008
Show: No
Criteria: True
Expr2: [End Date]=[End Date]<1/1/2008
Show: No
Criteria: True
View 6 Replies
View Related