Modules & VBA :: Cannot Complete Action Whilst Processing

Jan 16, 2014

I'm trying to setup a process of opening a form, saving to a location, emailing it as a PDF, killing the PDF, move onto the next form - rinse wash repeat until done.The below works fine on a single click, however if I try to set it as an event timer of loop, I get an error saying: This action cannot be carried out whilst processing a form or report event.

Do
Dim outputFileName, Ref As String
Ref = Vici_URN
outputFileName = CurrentProject.Path & "Claim PackagesCICA" & Ref & " - " & Format(Date, "yyyyMMdd") & ".pdf"

[code]..

View Replies


ADVERTISEMENT

Modules & VBA :: Take Data From One Table And Insert Into Another Whilst Doing Calculations On Data

May 2, 2014

I am trying to use SQL to run queries in our access database in order to (hopefully) speed things up. I'm trying to create code that basically takes data from one table and inserts it into another whilst doing calculations on the data.

However I can't get past this:

Code:
Private Sub Test_Click()
Dim strSQL As String

strSQL = "CREATE TABLE [TempRedAmberGreen]" & _
"AS (SELECT " & _
"[ID_CHK] String," & _
"[Red] String," & _
"[Amber] String," & _
"[Green] String)" & _
"FROM [035 - Meter Point HH Data];"
DoCmd.RunSQL strSQL

End Sub

It keeps saying "Run-time error '3292': Syntax error in field definition.

View 4 Replies View Related

Modules & VBA :: How To Read TXT File Into Array For Processing

Oct 23, 2014

I'm getting an error when trying to read a .txt file into an array for processing. The error and a snippet of the code are below.

Run-time error '9'
Subscript out of range

Dim iFileNum As String
Dim strLineInfo()
Dim i As Integer
Dim strExpensesFile As String
strExpensesFile = "c:FinanceExpensesIn.Txt"

[Code] .....

View 9 Replies View Related

Can I Update A Table Whilst Keeping Existing....

Apr 9, 2007

Data.

I have one table which holds the answers to a medical questionaire. 300 questions to be exact. This table has a Primary Key which is just an autonumber.

The problem I have, is that the questionaire results will be updated from time to time. Not the whole questionaire but maybe a couple of fields. Is there a way that the user can go back to the questionaire make the changes needed and then save, but at the same time still keep the original results in the table, but assign a new autonumber? The reason is that they do not want to fill out the whole questionaire again just to make a small change, but I need to keep all the results going back in history!!!!!

Sorry if I havent explained this perfectly. I have looked at the appen query and the update query but not sure if this would be correct procedure.

Thanks in advance. You dont have to tell me exactly how to do it but a hint in the right direction would be nice.:)

View 7 Replies View Related

Modules & VBA :: Yes / No Action Does Not Halt Macro

Sep 17, 2014

I have inserted a function via a module at the beginning of a Macro using the RunCode action:

Function Msgbox_Yes_No()
Dim Response As Integer
Response = MsgBox(prompt:="Select 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then
End If
End Function

However, it doesnt stop the macro from continuing on its way to delete a load of records if the user chooses no.

View 3 Replies View Related

Modules & VBA :: OpenForm Action Was Canceled

Apr 4, 2015

I have a form that opens when you initially open the MS Access file...

This first form posts session and user ID data to a sessions table, then closes itself and opens an end user form (i.e. the main form in the application)

It's work just fine for many weeks, up until a few minutes ago. Now, when I open the MS Access file I get this error message:

Run-time error '2501':

The OpenForm action was canceled.

When I choose "debug" from the error message, it's showing me that the error happens here:

Code:
Public Sub CloseMeAndOpenMain(frmMe As Form)
DoCmd.Close acForm, frmMe.Name
DoCmd.OpenForm "0100_0000_STRAT_AND_REQ_ASSEMBLY_ECs_LISTING"
End Sub

The thing is, I can then walk through the code with no issues (i.e. when I hit F8, it runs...)

Also when I open the first "sessions" form from inside MS Access (as opposed the file open feature) it runs just fine and opens the main end user file without any issue.

I only get the error when I initially open the first form from the file...

View 1 Replies View Related

Modules & VBA :: Add Contact From Outlook - Command Or Action Not Available

Jul 26, 2015

I am trying to use

RunMenuCommand
command : AddContactFromOutlook

But i get this error message

"The command or action AddFromOutlook isn't available now "

on a demo access "project manager" it works but in my data base does not ...

View 1 Replies View Related

Modules & VBA :: Output To PDF - On Click Action Cancelled

Jul 10, 2015

I have a button on-click action of:

Code:
DoCmd.OutputTo acOutputReport, "Bladereport", "PDFFormat(*.pdf)", , True, "", , acExportQualityPrint

It works perfectly with the box appearing to choose the directory and file name, having done this it then outputs perfectly.

However if you choose cancel at the file and directory selector box it crashes:

Run-time error '2501':
The OutputTo action was cancelled.

View 1 Replies View Related

Modules & VBA :: Button Action On Double Select

Jun 2, 2015

I've got a continuous form, with a button (cmd1) on each record. Each record has a unique primary key, RecordID. cmd1 is clicked to open a form (frm1) based on the RecordID using the following code:

Code:
DoCmd.OpenForm "frm1", , , "RecordID = " & Me.RecordID

I want frm1 to open, ONLY when a user clicks on cmd1 while it's already in focus ON that specific record.

View 14 Replies View Related

Modules & VBA :: Way To Check If Series Of Action Queries Can Be Run

Mar 4, 2014

Is there a way to check if a series of action queries can be run (without any error) before actually running the queries?

View 1 Replies View Related

Modules & VBA :: How To Change Action Of Existing Shortcut Keys

Aug 19, 2013

I've discovered that when I press control and A inside a memo field instead of the whole field text being selected the whole record is selected.

How do I disable shortcut keys or how do change the action of the existing shortcut keys?

View 9 Replies View Related

Modules & VBA :: Get File And Calculate Progress Of Downloading Action

Jun 21, 2015

Now I use wininet.dll library to get file and calculate progress of downloading action it is something like this:

Code:

Do
If InternetReadFile(hRequest, VarPtr(Buffer(0)), BUF_SIZE, dwBytesRead) Then
If WriteFile(hFile, VarPtr(Buffer(0)), dwBytesRead, dwBytesWritten, 0) Then
' TODO:// calculate progress
dwStatus = (dwStatus + dwBytesWritten)
dwPercent = (dwStatus / dwFileSize) * 100
Debug.Print dwPercent
'form1.Caption = dwPercent '<-- change this

[code]....

View 1 Replies View Related

Modules & VBA :: Using Access 2013 To Create Action Button In PowerPoint?

Nov 22, 2013

I am using VBA in Access 2013 to make a PowerPoint presentation using data from the access database. know if it is possible to use Access VBA to create a button in the presentation that runs a procedure itself?

View 1 Replies View Related

Payment Processing ERD Help

Nov 21, 2005

Hello,I'm designing a contract and payment processing database for a friends construction company. I've made an attempt at designing the data model, but wondered if anyone out there had ever come accross a similar scenario and could be of any help. I have attached a copy of my initial ERD.Entitys are as follows:CompanyHolds details of the company that are operating the system.CustomerBilling details for the customer.SiteA customer has many different sites at which work is undertaken.ContractA contract is created for all work undertaken at a customer site.PlotThe work a contract covers is carried out on various different plots at a customer site.StageWork is carried out in stages on a plot by plot basis. When a work stage is complete the stage can then be invoiced for payment.InvoiceOnce work stages are complete an invoice can be raised. An invoice can be for one or more stages (always under the same contract).Invoice_LineDetails of the different stages billed under a single invoice.PaymentStores detail of a customer payment.Payment_AllocationA single payment may be split accross multiple invoices. A single invoice may be paid through multiple payments.The main area I was hoping for help with is payment allocation, the requirements of which are listed below:1. When a payment is received it must be possible to split it accross multiple invoices (a payment will only ever be for invoices within a single contract).2. It must be possible for an invoice to be paid in part (i.e. be paid by mupltiple payments).3. If a payment isn't allocated in it's entirity, the the remainder should be put to a payment on account for allocation at a later date.4. An entire payment should be able to be put to a payment on account and then allocated later.5. It must be possible to enter credits against invoices.The reason I have Contract joined to Payment_Allocation is so that a payment on account can be created and linked back to the contract, for allocation at a later date. If a payment on account is stored as an entry in the payment_allocation table it will become difficult to then allocate the payment on account to invoices and keep an audit trail. The payment on account isn't really allocated until it is put against an invoice so I'm loathe to do it this way.On the other hand if I store the payment on account in the payment table (until allocated) it may make it harder for me to produce my statement report.I'm also having difficulty seeing how I can build a statement of account from these two tables...do I need to build up a transaction table in order to do this effectively? Or a temporary table of transations to base my report on?Any advise or pointers would be very helpful.Thanks in advance for your time.webbmatt

View 1 Replies View Related

Form Pre-processing

Dec 11, 2006

Hi
I have some code in a function that I want to run BEFORE a form (FormB) is displayed to the user.
FormB is called up by clicking on a button from another form (FormA), but when I display the ActiveForm . . .
Dim MyFormPO As Form
Set MyFormPO = Screen.ActiveForm
MsgBox "here!!-" & MyFormPO.Name
. . . I get the form name of FormA, and it errors-out because the objects I'm trying to reference do NOT exist in the Active form.
I've tried calling the function from every Form event ("OnOpen", "onLoad", "OnActivate" etc,,) but ActiveForm always seems to be the first form.
Anyone any ideas, please
Thanks
ajm

View 1 Replies View Related

How To Delay The Processing For Seconds

Aug 1, 2007

Is there any function to delay the system processing for a number of seconds.

For the time being I am do it indirectly by using loops, however, it is un proper way, as it is not scalable.

Also I dont want to use the timer control.

Thanks,

View 4 Replies View Related

Credit Card Processing

Apr 18, 2005

Does anyone know of any software or have any code that would allow to process credit cards.

View 4 Replies View Related

Order Processing & Warehouse Management

Sep 3, 2007

Hi all. I am considering developing a purchase order and warehouse management database, to be manage a cold store in my workplace.

What i have in mind is a system where the details of each pallet coming in is recorded (weight, quantity, location of pallet in warehouse etc.) is recorded, marked off against the corresponding purchase order number and then a label is printed with a barcode to quickly identify that pallet.

Handheld barcode scanners would be used to record when a pallet leaves the warhouse, and where its going to(despatch, production etc.). Ideally the scanners could be used to give forklift drivers order picking info aswell.

I'm fairly confident i can design the database, however, i have never done anything with barcodes, scanners or handheld devices. Is this even feasible with access? How do i go about doing it, any advice, example databases etc. greatly appreciated.

View 1 Replies View Related

Processing A Single Query In Two Databases

Nov 7, 2006

I have two identical databases in MS Access. I have created a query in the first mdb file, which retrieves the matching records in two tables.

My problem is that i want to execute the same query created in the database1, on database2, without creating the query in the database2.

I think it is possible, but the query i was trying was not working file.

select * from db1.[Query1] in 'C:DBDB2.mdb'

where db1 is the name of the first database,
db2 is the name of the second database and
Query1 is the name of the query in the db1.

Thanks in advance for the help.

View 1 Replies View Related

Tables :: Processing All Records In Table

Dec 5, 2013

I'm working on a system for recording employee information, leave details, etc. I need to run a monthly update to increment each employees leave balance.

The two tables now in question are;

Employees - relevant fields are EmployeeID (key), Active (Boolean) and Leave (Numeric) [annual leave entitlement - eg 15 days]

The second table is LeaveTrans; Emprec, LDate, LType, PrevBal, ThisLeave, NewBal, Comments.

What I need to achieve;

For each "Active" record in the employee table, detirmine the monthly leave entitlement ("Leave" /12 - no problem here).

Append a new record to the LeaveTrans table with;

Emprec, LDate (Date of the update), LType (="Monthly allocation"), PrevBal (The NewBal from the last record in the table for this employee), ThisLeave (monthly allocation) and NewBal (PrevBal + ThisLeave)

I will need to access the last record for this employee to get the previous NewBal, before appending the new record.

The problem I'm having is appending to the LeaveTrans table, and then moving on to the next record in the Employee table, to repeat the process.

View 4 Replies View Related

A Solution To Manually Processing 'Entry Forms'

Mar 2, 2007

Hi Guys,

I've been pondering over a problem for a couple of weeks now - We receive around 1000 paper entries to our competition, and these all need manually entered into the access database in a one-er.

Is anyone aware of any ideas of how this could be made easier, and more automated?

Thanks.

View 3 Replies View Related

Queries :: Return Info To Table After Processing

Nov 21, 2014

I have a table (tblInstallations) which has records of date installed (for machines).

It is calculating that "next due maintenance" is one year after installation.

Sometimes we need to visit the site to maintain or service the machine before/after the specified date in "next due maintenance" and we need this to be calculated to reflect a year after date of visit.

I have a table called "tblMaintenance" which takes information about the machine an engineer is visiting from where originally the information are kept and that is in "tblInstallations".

How can I link the new date of the visit to update the record for "next due maintenance"...

View 4 Replies View Related

Reports :: Importing And Processing Excel File For Report

Mar 26, 2013

I have an excel file that I need to prepare to create a report.It would be great if I could do this with Access 2003. This would mean that I need to import the excel file and create a table to handle this.Is there by any chance that I don't need to create a table and I can process the excel file? Or maybe automate the import of the excel file into table and only use a few of the columns so later I can create the report in access.Also what I need to do is add some columns with text in it (a standard text) that needs to add a day taken form the column to the right.

I simply would like to avoid to create a table from the import as this would make me end with a lot of tables (or mabye option to delete the table after finishing producing the report.

View 1 Replies View Related

Reports :: Adding Page Numbers Adds Processing Time

May 15, 2013

I'm working on a pretty serious report (at least for me)...I have 3 sub-reports inside, and the point of this is to use VBA and loop through several conditions (in the underlying queries), and print out in a batch for the user. When I add a page number footer it adds about 3 seconds to the processing time for a 14 page report. That doesn't sound like a whole lot, but when I loop through and process this 12 times, that's a lot of added time for the user...(the last thing I want to hear is it's slow!)

So, would it be faster if I set the page numbers in VBA? What event would I use? On Load?!? Also, how would I find the page number variables in VBA?

View 1 Replies View Related

General :: Sending Form Through Email And Processing Responses - Access 2010

Oct 16, 2012

I'm working on a vacation/time off tracker and was hoping to use the collect data feature. I've created a form where a user submits their requested date and number of hours, at which point I'd like the form to be sent to their manager for approval. The manager's email address is stored in a table. Once the manager marks yes or no, I'd like that reflected in the time off requests table, and an email sent to the requester letting them know if it was approved or not. Is this possible? How would I go about it. I'm pretty new to Access, learning on the fly, but I'm pretty good at modifying code to match my situation/working backwards if you have any examples for me to look at.

View 1 Replies View Related

SQL Almost Complete

Apr 28, 2006

For a graph i have the below code sql to define the chart results


SELECT [Load],[Displacement] FROM [try];


try is a text box containing a table name within the access DB. how do i change the FROM sql statement to look at the name in the text box and use it as to draw the graph?

options in the text box are for example

TABLE1
TABLE2
etc....

If i use
SELECT [Load],[Displacement] FROM [TABLE1];
SELECT [Load],[Displacement] FROM [TABLE2];

all is well, i need to get it to look at the text box, well a combo box

View 1 Replies View Related







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