Running AUTOEXEC After Holding Down Shift Key - Function Runs Multiple Times?
Aug 19, 2013
I bring up the database (Access 2003 / XP) by holding down the shift-key. As designed, the shift-key by-passes running the autoexec macro automatically. I then run the autoexec macro with the vba code viewer up so I can F8 down through all the code. The autoexec macro is one statement - RUNCODE which executes a vba FUNCTION Startup(). Everything seems to work great, but when the function goes to EXIT FUNCTION I assumed it's completed. BUT the next F8 GOES TO THE Startup() FUNCTION again and runs through the code over and over.
I don't think it does this when the program actually runs normally (don't by-pass the autoexec), but why it's running the function over and over again when I'm F8'ing through the code.
Is it something peculiar with the AUTOEXEC in MS ACCESS? Can I trust that it really does ONLY RUN ONE TIME?
View Replies
ADVERTISEMENT
Dec 22, 2014
I can manually stop the AutoExec macro from running by holding down the shift button - how do you do it by VBA? I'm opening the db from Excel, and I don't want the Switchboard to display ...
View 1 Replies
View Related
Feb 19, 2014
I have a DB with an AutoExec macro. I created the DB from scratch. When I open the DB from Windows Explorer with the shift key held down the AutoExec macro still runs. If I have people on other computers open the same way it doesn't run. If I open Access first then hold the shift key down it doesn't run. I couldn't find any references to a shift key issue like this. I'm looking for an answer as to why there would be a difference on my PC between opening in WE or directly in Access.
View 3 Replies
View Related
Oct 20, 2005
I'm trying to clean up one HUGE and ugly form by using subforms within tabs. I have a main form with "BottleID" as the key field and linking field. The tab displays pictures based on the BottleID and it works like a dream. My problem is that the "on_current" event happens 4 times on each record. For instance, I go up a record and it sets Picture1.value 4 times and it's the same thing everytime.
I'm wondering if the problems is due to bad table design. Everything is located within one table and I'm really unable to change this. It's been like this from the get go and too much to change to break it apart. Anyway, the subform is pulling data from the same table. I thought maybe this was the cause.
I'd post the database if possible, however there are hardcoded directory's and will not work unless they are all set up. Not worth it IMO. Any ideas? I tried doing the BottleID = forms!frmMain!BottleID instead of the auto-link in Access but it gives me several errors and I don't believe it buys me anything. Thanks in advance!
View 3 Replies
View Related
Jul 29, 2007
Hello,
Believe it or not, we just upgraded from Access 2000 to 2003. In Access 2000, I have my dbs set up so that you must hold the shift key down while opening the db in order to see the database window. In 2003, holding down the shift key isn't working. Is there another way to get the database window open (or am I doing something terribly wrong)?
Thanks in advance.
View 1 Replies
View Related
Oct 16, 2013
Normally when I hold down the shift key when opening an Access database it opens in development mode. When I do this on a certain database it does not. It still opens in program mode. If I hit F11 it goes into a sort of development mode but I do not get the ribbon bar at the top etc.
Has something been set on this database to stop it opening in development mode? Can I switch it off?
View 2 Replies
View Related
Dec 10, 2014
I have a situation where I am using a maketable query to create a table and then I need to use append queries to then add additional records to the created table - some of these are just run once and some multiple times.
if possible, I do not want to hard code the query multiple times i.e.
Code:
DoCmd.OpenQuery "qryCreate_1"
DoCmd.OpenQuery "qryAppend_1"
DoCmd.OpenQuery "qryAppend_1"
DoCmd.OpenQuery "qryAppend_1"
etc
So is there a way I can run the make table query and then get some sort of loop to run the append query a number of times ?
View 4 Replies
View Related
Nov 12, 2004
Dear All:
I have a form with a checkox. Is there any way to keep a running total on the form to display how many times a checkbox has been checked?
I am clueless on this one, any help is most welcome.
Regards,
Dion
View 5 Replies
View Related
Apr 20, 2005
Hello All
The problem that I am faced with is that I am try to automate a function that I have created that exports my access tables into XML. The function works great but now I want to take it to the next step. What I want to do is when a person exits my database I want the db to run this function before exiting so that all the new information is updated in the xml files. Any help would be highly appreciated.
View 3 Replies
View Related
Feb 9, 2007
I am really new at access 2003 and queries s forgive me if this question is really dumb/simple/confusing...here goes
I created a query where I ask the user to provide the info for the date range..<[Before date]
it worked fine.
I then added something to the database and ran it again and it now asks me for my date not once, but twice..i then copy and paste query with a new name and it asks me for the same info 4 times
Help me please..Thanks
View 2 Replies
View Related
Sep 7, 2006
Hi again everyone,
With help on my first question Ive now got my cascading combo boxes working to a stage that shows all the information I need,
Currently Ive got 4 cbs and they work bring in and updating depending on what is selected in the previous etc etc.
combo1 = 2
combo2 = 5
combo3 = null
combo4 = null
how can I tell it to use combo2 since there is no values selected in 3 and 4
Ive currently got the combo boxes in a form of their own, basically in my main form Id like to be able to click on a button to update a value, and then it will bring up the form for the combo boxes, then id select the values till I had what i needed, and then it would fill in the value on the main form with my selection from the combo boxes,
to make it abit harder, on the main page, there is 3 values that will need to get their value from the combo boxes, will that just mean I have to make 3 forms with the combo boxes in them, one for each of the values on the main page, or could I just have one form and maybe put a button saying (Use this Selection for Value 1)(Use this Selection for Value 2) etc etc.
Ive looked through the net alot and cant seem to find any examples that suit my question... but if anyone knows of a good example that would be awesome.
Cheer Ezy
View 8 Replies
View Related
Mar 13, 2006
Hi,
How can i run some vba cose directly after i click the move next button on the navigation but at the bottom of the form.
Thanks
k0r54
View 2 Replies
View Related
Jan 24, 2008
hi
I've got a series of analytical data tables and queries setup.
one of the queries will do a length weighted average based on a user input FROM and TO distances, this query works fine and produces a report.
What I have is a table that contains a list of m FROM TO distances,
rather than picking them one at a time I'd like to set up a report that would get the FROM TO info from the Table, call the query and report each of the FROM TO distance averages on a line in the report.
What's the easiest method to use to set this up. any code snipets would help to get me started and any help greatly appreciated.
View 2 Replies
View Related
Mar 12, 2008
Hello All,
I am creating a database that is supposed to capture the employee's type of work, time it takes to do the work, etc...
So far, it does what it's supposed to do but my record's are all over the place.
E.g. i have tables called:
tblDailyActivities - this table is supposed to store all record without sorting.
tblemployees - this table is supposed to have a list of employees and when maximized, all records associated to that particular employee should be listed.
However, the i have right now is that instead of listing it under the particular employee, it lists the employee's name individually for each item listed.
What i want is to for the tblemployees to be listed like tblfunctions.
see attached database since i probably am not making any sense right now.
Thank you,
John
View 9 Replies
View Related
Aug 15, 2011
I have a report with a subreport. I have added a parameter to the query to prompt for [manager] or is null to get all managers. However, on the report when I enter a manager my count on the subreport still returns the count for all. So, I added the same prompt to the query for the subreport. It returns the right count, however, it prompts for the manager multiple times. How do I get it to prompt only once yet get the right total?
View 1 Replies
View Related
Jul 13, 2014
I need to stop already ran procedure or function with vba code . So I use END command ans everything stops.. in some cases that is useful, but some times need I to do something else after I use END command, but after END everything stops...
LIKE THIS :
SUB ()
END
ME.CTL.SETFOCUS
'OR
CALL function
EXIT SUB
View 5 Replies
View Related
Dec 3, 2014
How does one handle function errors when running a query? Specifically:
(a) I have a user-defined function that lacks any error handling code except for an Exit Function that gets triggered if there is an unacceptable input parameter (e.g. typo in a flag value).
(b) This works fine when the function is simply part of VBA code or used in the Immediate window of the VBA editor. However,
(c) when the function is used in a SQL Select Query, I get bumped into the de-bugger, and Exit from there does not get me out of the Query. It just gets me out of the current record being processed and then hangs up again on the next.
It seems, therefore, that the function needs to have some instructions that abort the entire query when the function aborts the very first time.
View 9 Replies
View Related
Mar 8, 2007
Hi there,
I'm trying to 'rank' x5 categories that overlap. To determine the ranking i'm utilising date & time (if the dates are equal). I've managed to do this comparing x2 of the categories but struggling with the logic for x3,x4 & x5 categories
I have the data in separate tables by category date & time and in one large table.
Hoping someone can assist as my head is starting to hurt.
Thanks
View 4 Replies
View Related
Oct 3, 2006
I hope someone can help me on my problem below:-
A user wanted to key in the data in a single form where she can select where
a particular procedure is located. The procedure could be duplicated and
placed in a few departments.
My tables are as follows:-
tbl_Proc_Dept:-
ProcNo - Text (Primary)
TrgConducted - Yes/No
DeptAbbv - Text (Primary)
tbl_Dept:-
DeptAbbv:- Text (Primary)
DeptDetails:- Text
I created a form where i have the following fields in the form:-
1. ProcedureNo - Text
2. TrgConducted - CheckBox
3. MainDept- ComboBox (DeptAbbv data field)
4. Finance – CheckBox (DeptAbbv data field?)
5. Admin – CheckBox (DeptAbbv data field?)
6. Purchasing – CheckBox (DeptAbbv data field?)
7. Facilities – CheckBox (DeptAbbv data field?)
8. MIS – CheckBox (DeptAbbv data field?)
How can I add multiple deptabbv field in a single form?
Pls help.
Thanks.
View 1 Replies
View Related
Sep 27, 2006
I have a report that is based on a query. In the query, I have it prompt for a criteria for a field. It prompts for the name of an event, so only the participants of that event are displayed.
Also on that report, I have a subreport, which is based on that same query, but returns different data.
My problem is that since both the main report and the subreport are based on the query that prompts for input, it's prompting me multiple times for the same input when I view the report.
Is there a way to have Access use the same prompted input for both reports, so I don't have to enter it more than once?
View 1 Replies
View Related
Nov 16, 2006
Hey all, i would appreciate some help with Access here.
I am an attorney, and i am trying to set up an access database for all of my cases.
I have one table in which i keep the names, contact information, etc of all the witnesses who i have used or will be using (especially expert or law enforcement witnesses who i will be using in multiple cases).
I also have a main table in which i have a record for each case. Because I have multiple witnesses for most of my cases, I have had to create multiple relationships between my main cases table and my witnesses table.
My question is this: How do I specify when setting up a report (or a form/query/etc) that when i ask for the witness's address i am looking for the address i made with a particular witness, specify that relationship between the two tables, as opposed to the other relationships between the same two tables.
I hope that makes sense, and i would very much appreciate if someone could give me instructions.
Thank you.
Jay B
View 1 Replies
View Related
Jun 14, 2013
Here is my delima, I have a report that I am able to type in a keyword and it will pull up that report exactly as I type the keyword, however, let's say that I want to pull up someone else's report I cannot. I have to exit out of my report and then go back into it and resubmit the new search.
View 13 Replies
View Related
May 29, 2014
I have created a query with parameters and a report from the query. The report is requesting the paramater multiple times but the query is running fine. How to resolve? Again, the query requests the parameter once but the report multiple times (6x).
View 3 Replies
View Related
Dec 23, 2013
I've narrowed my problem to a subreport that prints multiple copies of the report based on the number of items generated in the subreport.
i.e. If I have an instructor registered to teach three classes in the subreport, the main report will print three time (identical). An instructor with two classes will print twice (identical).
No button...just good old "print" how? why? where?
View 3 Replies
View Related
Sep 20, 2013
At the moment I am working a little project at work and am stuck on how to calculate departments due date based on actual order due date.
example:
OrderID: xxxxxx-xx DueDate: 10/8/13
Now let say i have 5 different departments but I want/need to know what should be the due date for each of those departments based on the due date on top.
View 4 Replies
View Related
Nov 17, 2014
I set up what I thought was a simple query in my DB using it to create a report containing a subreport.
I kind of works, however Access is asking me for the parameter value [Extract Date] multiple times, when in theory it should only ask once!
In addition (and likely related) the Access is then repeating the output multiple times.
View 8 Replies
View Related