No VBA Modules In Access DB Running On OSX

Jan 7, 2013

I have just installed the windows version of Access 2010 on OSX Mountain Lion using a program called Crossover which works very similarly to WINE. I have found that Access will install fine except for VBA form modules and BAS modules, although there seems to be no indication that they did not install as the entire install progresses fine.

I've put together an invoicing program that was created in Access 2010 in Windows but have transferred it over to Access 2010 installed on OSX. It contains a number of forms with code but when I go to VBE, form code modules are not visible. When I try to view the code for a form I get the following error message: "Microsoft Access failed to create the Visual Basic module. If your database is on a network drive, check your network connection, then try again". I was able to insert a BAS module and create a rudimentary VBA subroutine which ran without error so it does seem able to interpret VBA as per normal.

View Replies


ADVERTISEMENT

Modules & VBA :: Excel Running Access - Returns No Results On 1st Go

Aug 6, 2013

I wrote some code in Excel to open and run a module in Access. The code executes, but when I check the results I get no records, however if I just step back 1 line and rerun the query, I get records. Alternately, if I run the code twice it will get results the 2nd time.

The OpenCounter opens a Session in the terminal screen then performs a macro that writes to a temporary table.

Here is the code:

Dim db As ADODB.Connection, Rst As ADODB.Recordset
Dim Acc As Access.Application
Set db = New ADODB.Connection
db.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DBPath
Set Rst = New ADODB.Recordset

[Code] ....

One thing I tried with limited success was to tell the OpenCounter to open and close the table after it was done writing to it, but that seems like a lazy solution and it also doesn't always work.

View 1 Replies View Related

General :: Only Open MS Access Form Without Access Running In Background?

Aug 7, 2013

I have made a form on access which will be used by other employees within the company, however they have never used access before and they are wanting to access only just the form as I feel with Access and all the tools in the background will confuse them, plus I don't want them editing the data base its self.

Is there a way to only bring up the form, unless I obviously need to edit the date base.

I've done some research on Google and it seems I need to use:

SW_SHOWMINNOACTIVE

However I can not seem to find how I would use this or where?

and also if i did find a way to only bring up the form, how would I be able to switch it from that veiw to the veiw I edit in?

View 2 Replies View Related

Problem Running Access 2007 And Access 2002

Mar 27, 2007

Having a problem here after installing 2007. All my previously created databases work fine in 2007 (after clicking the enable, which is a pain,but don't know any other way) When I return to 2002 and try to open the databases I get different errors all something like this on....... "The expression On Open you entered as the event property setting produced the following error: Object or class does not support the set of events. Whats up here?????I have found a site here...http://allenbrowne.com/bug-17.htmlMentions this problem,but refers to Vista..... Does the same apply to XP? And which is the best fix?

View 7 Replies View Related

Modules & VBA :: Running SQL From A Subroutine In A Subform?

Feb 23, 2015

I'm trying to run an sql update query (in VBA) to update values in a table, from calculated field values in a subform (using a query as a record source).

Is this possible , and if so, can I call the subroutine from the parent form, and what would be the correct syntax for the VBA sql string (i'm guessing it would be a docmd.runSQL sqlstringname )??

View 1 Replies View Related

Modules & VBA :: Running Total With Criteria Using UDF

Aug 5, 2015

I have determined the solution to my problem lies outside of normal SQL queries and I need to create a UDF.

Here is the problem. I need to create a running total based on the sum of two fields [PTS_ISSUED] & [PTS_REDUCED] with one restriction. The total can never be less than 0. If it is less than zero, the totals reset with [PTS_ISSUED] as the new starting point.

I've attached an excel spreadsheet. Column"C" contains the formula logic I am trying to replicate into access.

I will be honest, writing the UDF is beyond my current knowledge but once I see it I am able to understand it and implement it.

I believe the solution needs to store the running total into a variable, make the necessary comparisons and determine if its okay to add the [PTS_ISSUED and [PTS_REDUCED] to the stored total of the previous calculations then advance. I just have no clue in how to go about writing it.

This calculation needs to be presented in Access because the results will drive several other functions within the database.

View 8 Replies View Related

Modules & VBA :: Running A Macro From Another Form

Jan 31, 2014

I have 2 forms and a macro in Form1 which runs throught every record to update the records, however.I would like to run this macro from the main form (Form2)

I have tried
docmd.openform "Form1"
Run Macro

but it doesnt work

View 4 Replies View Related

Modules & VBA :: How To Disable Running Database

Jul 23, 2015

I created a database that uses the "lngEmpName " number to give user permissions , what I need is to be able to disable the running of the database (or main form)and show an error message using vba if I have not logged in for around two weeks is this possible ? if so how and even better a demo would be fantastic.

View 4 Replies View Related

Modules & VBA :: Running Query With No Lock

Apr 1, 2014

I am running delete and update queries using docmd.runsql. I am finding that particularly after the update query is ran the record is locked and other field in that record can not be updated via a form without a warning saying another user has made changes to the record. To be more specific -- I have a vendor table which has fields vendorname, vendorstreet, vendorcity, vendoraddress. A form is used to place a street address to the vendorname. onexit of the street textbox an update query is ran using DoCmd.RunSql updateing the vendoraddress field to an 'X'. When I put the city in and then close the form this is when the error occurs stating that another user has made changes to the record. My thought is that the update query has not unlocked the record. The customer wants the X to be placed in the field without his manually placing it in the field.

View 1 Replies View Related

Modules & VBA :: Get Value Of A Control In Another Running Database

Nov 7, 2014

I have a POS system, packaged with Access Runtime, running on a PC and have developed a database system to provide additional function. I have no documentation to the names of the Forms or Controls in POS. My ADDON system does link to the POS Tables and has some Tables of its own.

At the time in the POS system where the cashier checks out the customer, they need to AltTab to my ADDON system to enter some information for the customer. They remember to CustomerKey from the screen on the POS system and key it into a Form Control in my ADDON system.I want to, from my ADDON system, read the value of the CustomerKey in POS and fill it in so the cashier does not need to remember/type it.

Is it possible to get the data from another already running Access database?I don't know the name of the control. Is it possible to run through a list of Forms and Controls in the POS system from my ADDON system?

I do know the name of the field in the Table and expect it to be current and might have to get that?Failing all that, is there a Collection of running Access databases? I could go through its Forms and Controls one time looking for what i want.

View 1 Replies View Related

Modules & VBA :: Modify Progress Bar So Instead Of Saying Running Query?

Nov 8, 2013

Is there any way to modify the progress bar so instead of saying "running query" it states the name of the query?

Like: Running Query [qryFRED] <progress bar>

View 1 Replies View Related

Modules & VBA :: Running Queries Multiple Times In VBA

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

Modules & VBA :: Remove Prompt While Running Report

Apr 9, 2015

I posted this within the Reports as well, but since this has a little bit of VBA decided to ask this here as well.

I have a report that is created from the following query (qryTotalProjectHours). What I am trying to do is get the total hours spent on Tasks within a given time period. A given Task can we worked on by multiple individuals and hence I need to find a way to aggregate the hours spent.

Code:
SELECT TasksEntries.Project, TasksEntries.Task, Sum(TimeTracker.WorkHours) AS TotalHours
FROM TasksEntries INNER JOIN TimeTracker
ON (TasksEntries.EmployeeId = TimeTracker.EmployeeId) AND (TasksEntries.TaskID = TimeTracker.TaskId)
GROUP BY TasksEntries.Project, TasksEntries.Task

I accept the start and end dates in a form and pass it like shown below. WorkDate is a column in the TimeTracker table and is not present in any other table.

Code:
strWhere = "WorkDate BETWEEN #" & txtMgrRptStartDate & "# AND #" & txtMgrRptEndDate & "#"
DoCmd.OpenReport "rptTotalProjectHours", acViewPreview, "qryTotalProjectHours", strWhere, acWindowNormal

When the report is invoked, I get a box where it says
"Enter parameter value" for Workdate..

Is there anyway I can get rid of the prompt? I never thought you needed the column name in the SELECT statement to be able to run this.

I should add the I tried the query with the WorkDate hardcoded in there and it worked fine and returned the correct results

I have attached the cut down version of the database that I am working on.Open up the frmManagerReport Form
Leave the Employee drop down empty
Enter the start and end dates ( I have used 4/1/2015 and 4/30/2015)
Select the 3rd option "Generate Tasks by Total Hours"
click on Run
When you do that you will see the prompt come up. Enter any date and you will see the report. The report generated uses the results from the query and does not filter on the date selected in the form. This is what I have been struggling to fix since yesterday but have reached nowhere..

View 11 Replies View Related

Modules & VBA :: Code To Find Out If Another Program Is Running?

May 19, 2014

I found code at this website that is supposed to determine if a specific program is running on your computer. I have a couple questions about the code here. One, when I run it just the way it is and call it in the immediate window with the ?fIsAppRunning("word") command, it tells me "True" whether I have Microsoft Word open or not.

My other question is this: After the code is working properly, how can I add new programs to it? There are two programs the end user might need open to complete a process. One is called Extra and one is called tn3270 (this is how they show up in the Processes tab of the Task Manager). I think in order to add them to this code, I need to know a "class" to associate with them.

View 1 Replies View Related

Modules & VBA :: Running Queries On Specific Tables

Oct 30, 2014

I am pretty new to VBA coding and need running queries on specific tables. This is part of a multistep process, of importing data that needs to be transposed before appending to the "cleaned" database. First, users will save auto generated, Excel workbooks from a machine into a designated folder. I have code that will import these workbooks (an unknown number at a time) into Access in separate tables by workbook.

Each table will have a similar name, but different extension (ie Sheet101, Sheet102, etc.). This is where the issue arises. The files are in long form, not wide. I have a series of queries (unfortunately, they're not SQL queries, but I can convert them to be) that transform the data from long to wide. However, I do not know how to go about writing code that will run the queries ONLY on the imported tables (again an unknown number of tables with similar names), not the rest of the tables in my database. I'm guessing it involves a do loop, but I am not positive.

View 8 Replies View Related

Modules & VBA :: Running Total Based On Set Criteria

Oct 30, 2013

I have a query I am trying to build currently which creates a running total based on set criteria. I essentially have three columns (All times are in minutes). The visit ID, the duration of a visit and the time difference between the current and previous visit. e.g.

ID Duration Difference
1 30 0
2 45 10
3 15 20
4 60 10
5 15 10

What I would like to achieve is the following:

ID Duration Difference running total
1 30 0 30
2 45 10 85
3 15 20 15
4 60 10 85
5 15 10 110

So a line will have the calculation of the current time + the difference between the current and previous visit if the difference is below 20. I have the following:

Code:
Public Function Cont20(MyVal As Long, MyDif As Long) As Long
Static OldValue As Long
Dim NewValue As Long
If MyDif >= 20 Then
NewValue = MyVal
OldValue = 0

[Code]....

Which I put as Cont20([Duration],[Difference])

The problem seems to be on the return aspect, its not calculating correctly. I had the formula in Excel which worked great, but this is proving troublesome. As a note the Excel formula was such that it would add the previous running total and then add the current duration and current diff. e.g. In cell A7 the formula would be A6+B7+C7 and so on.

View 6 Replies View Related

Modules & VBA :: How To Stop Running Procedure Or Function

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

DB Closes But Access Keeps Running!

Feb 10, 2006

I run several databases daily - after running two of them (at different times), the database itself closes but the Access program stays open. In order to close that program, I have to close it out using the Task Manager.

Any suggested solutions? Thanks (as always) for your assistance.

Bob

:confused:

View 1 Replies View Related

Need Help To Calculate A Running GPA In Access!

Apr 25, 2006

Hello, I have volunteered to do a database for the school of nursing to use at a small Christian University using Microsoft Access 2003. I have Students, and each of these students is going to take each of these 12 nursing courses. Each nursing course has a specific number of credit hours (2,3,6, etc.) and they are to receive a grade for each class (on a 4 point scale, so their grades are going to be a number 0 for F through 4 for an A). I need to have access calculate a running GPA which only takes into consideration the classes they have completed thus far. Any help would be appreciated. I can do it in excel by just leaving the row for untaken courses blank, then autosumming the credit hours column for total hours taken. I can use a formula for each row that just multiplies the grade (like 4.0) by the credit hours (like 3) and get a total grade points of 12 for that course. Then I can add those numbers up(autosum the total grade points column) and devide by the calculated autosum number I would call total hours. I hope it is clear what I am trying to do and why I don't know how to do it in Access. ***************Extra Info*********
I have a student table and each student has a unique studentID, I have a second table called Nursing grades which I have a Student ID field, and 2 fields for each class a grade recieved and a credit hours field (ex. I have PharmacologyGR and PharmacologyCH, NursingResearchGR and NursingResearchCH). If I need to redesign how I have my tables I can do that, I have a unique Course ID for each course I could put in if needed. Basically, I'll do whatever it takes to get this to work.
Thank you so much for even reading this far, and any help would be appreciated more than you know.

View 1 Replies View Related

Running Access 2.0 Application

Jul 20, 2006

Hello,

I have an Access application which was written on Access 2.0. I need to run it (as is). I saw that it was possible to run it using some kind of Access 2.0 runtime environment - my client uses the following command to run the application:

Msarn200.exe application.mdb /ini application.ini

Where can I get this MSARN200? Do I have to find the Access 2.0 installation itself?

View 5 Replies View Related

Running Reminders Through Access

Aug 23, 2007

Is there anyway to use Access to run reminders?

I am trying to figure out the easiest way to have a reminder pop-up to run a letter for specific reps that would happen every 3 months.

Thanks for any help on this.

View 1 Replies View Related

Running Count In Access

May 17, 2007

I am trying to count records in a running sum fashion in a QUERY and for the records to restart when the field changes. I tried DCount without success.

ie. if a field contained the following data
Code Running Count
C101 1
C101 2
C103 1
C103 2
C103 3
C104 1
C104 2

Thanks

View 1 Replies View Related

Running .bat Files From Access

Mar 1, 2007

Anyone know how to run a bat file from Access.

This is what I am trying....I see the DOS window pop up and then its gone...the .bat does not appear to be running.

Call Shell(Environ$("COMSPEC") & " /c F:BAT_File_Storagedir_list.bat", vbNormalFocus)


ADDITIONALLY I want to replace "F:BAT_File_Storagedir_list.bat" with variable. What woudl be the correct syntax for that?


.

View 3 Replies View Related

Access 07 Running 03 File

Aug 21, 2007

does anyone ever have problems with constant crashing. it just crashes for no reason, i'll just start typing some code then CRASH. i'm all up to date according to mircosoft.
i'm running vista/office07/accessfile00-03

View 1 Replies View Related

Modules & VBA :: Running Multiple Queries In A Routine - Error Handling

Oct 9, 2013

I am using access 2010. I use basic error handling in my routines:

Code:
On Error GoTo errHandler ... exitHere: ... errHandler: MsgBox "Error " & Err.Number & ": " & Err.Description

The problem is lately; while testing I am running multiple queries in a routine. When it fails; its hard to identify which query has the problem. So I hit control break; debug and try to find it. After I fix it; I debug and reset; i get this continuing hourglass thing in the form of a spinning circle until I close and reopen the database. I think I need better error handling but not something really complicated because I need to put it in quite a few routines throughout the database.

View 2 Replies View Related

Modules & VBA :: Data Type Mismatch Error When Running Sql Query

Jan 16, 2014

I have vba code that creates the following SQL:

SELECT SubscheduleID, EventID, WeekOrder, DayID, StartTime, EndTime, Priority, CanJoin, PatientTitle, PatientNickname, IncludesPatient, IncludesAftercare, Letter1
FROM [qryScheduleCombinedDetails]
WHERE (SubscheduleID = 1 AND IncludesPatient = -1 AND DuringAftercare <> "AC only" AND (WeekOrder = "All" OR WeekOrder = 3 OR (WeekOrder = 1 AND Letter1 = "XYZ")) AND DayID = 2 AND StartTime <= #8:00:00 AM# AND EndTime >= #8:30:00 AM#);

When I try to run it, I get a "data type mismatch" error. When I put the same code into a query, I get the same error. However, it will run if I delete either condition from within the (WeekOrder = 1 AND Letter1 = "XYZ") pairing. I can't figure why it can run with either of those, but not both together.

WeekOrder is defined as String. Letter1 is calculated as Cstr(Nz(IIf(Letter,"XYZ","ABC"))) within [qryScheduleCombinedDetails], because I wanted to make sure that it would be recognized as a string.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved