Cancel Queries' Changes Before Operation Ends

Nov 5, 2005

WHAT IS WRONG WITH THIS CODE:

Dim wsp As Workspace
Dim fInTrans As Boolean

On Error GoTo C4Err

fInTrans = False
Set wsp = DBEngine.Workspaces(0)

wsp.BeginTrans
fInTrans = True

DoCmd.OpenQuery "query1"
DoCmd.OpenQuery "query2"
DoCmd.OpenQuery "query3"
DoCmd.OpenQuery "query4"

wsp.CommitTrans

C4Exit:
Set wsp = Nothing
Exit Sub

C4Err:
MsgBox Err.Description
If fInTrans Then
wsp.Rollback
End If
Resume C4Exit

I WANT TO RUN 4 BIG APPEND QUERYS BUT IF USER PRESS ESCAPE BUTTON BEFORE ALL QUERYS ARE FINISHED - THEN ALL RECORD CHANGES MADE BY THOSE QUERYS MUST BE CANCELED.
SO I MADE THIS CODE. BUT IT DOES NOT WORK.

View Replies


ADVERTISEMENT

Cancel Record In Subform If Click Cancel On Parent Form Before Save

May 24, 2014

I have a form and a subform in it. I added New cancel button in the form so that the the user can cancel the record creation and no record will be inserted in the parent table.

But when details are entered in the subform (a datasheet) row records will be created in the subform table. what is the correct method or how to cancel these records if the user choose to click cancel button on the parent form.

View 5 Replies View Related

Queries :: Cancel Age Calculation Query For One Record

Mar 26, 2013

I have the following age calculation query:

Age: (Now()-[DOB])365

It works a treat! However, I do not want this to continue to calculate if the record has them as deceased - I want it to stop at their date of death.

I have a tick box that when selected indicates that this record has died, and a field where you can enter date of death.

Is there some way that via clicking this button, or by entering a date of death, I can stop the Age Query from calculating for just that relevant record, not all of them? If so, where to place the necessary VBA, etc?

View 8 Replies View Related

Multiple Back-ends

Oct 16, 2006

For the company I am doing my thesis, I developed a tool in MS Access for monitoring sales data, customers, employee data etc…
The tool is working with a front-end database, installed locally on every PC and a Back-end on the company’s server ( Located at city Genk)
The tool is working smooth on the location in Genk.
But then the problem occurs when this tool had to be used on an other company location, 100km from the server (Antwerp); the waiting and loading times are very long, even for the smallest data.

Obvious this is because the companies network from one location to another is too slow. But because of financial reasons I’m looking for a software solution.

An idea is to create a Back-end server for each location, for all local data and one general back-end server for unique data ( for instance: there has to be a unique calculation number for each calculation made in the entire company).
I think this will decrease waiting times for some data, but not all…

Or does anyone have an other idea?

View 1 Replies View Related

Front And Back Ends

Jul 25, 2007

Hi guys,
I need help with security settings and that. I have a database which i want available on a shared server. Basically i only want people to beable to see one form but not beable to see anything else or make any changes to this form.

Do i need to split and make a front and back end? I will want to make occasional changes to tables etc.. and so would want this to automatically update on the database seen by everyone else.

Sorry, not making much sense but am bit confused about it all!

Any help from some clever peeps?
Ta

View 6 Replies View Related

Multiple Back-ends

Oct 16, 2006

For the company I am doing my thesis, I developed a tool in MS Access for monitoring sales data, customers, employee data etc…
The tool is working with a front-end database, installed locally on every PC and a Back-end on the company’s server ( Located at city Genk)
The tool is working smooth on the location in Genk.
But then the problem occurs when this tool had to be used on an other company location, 100km from the server (Antwerp); the waiting and loading times are very long, even for the smallest data.

Obvious this is because the companies network from one location to another is too slow. But because of financial reasons I’m looking for a software solution.

An idea is to create a Back-end server for each location, for all local data and one general back-end server for unique data ( for instance: there has to be a unique calculation number for each calculation made in the entire company).
I think this will decrease waiting times for some data, but not all…

Or does anyone have an other idea?

View 1 Replies View Related

Call Shell(...) - Wait Until App Ends

Feb 4, 2007

Hey guys!

just wondering if there is an way to command

Call Shell("my_bakcup_string",1)

and wait 'till the bakcup program ends to go next command in VBA

thank you! :cool:

View 4 Replies View Related

Modules & VBA :: Using Same Module With 2 Front Ends?

Jun 24, 2015

I have a small system that consists of a back end data base and 2 front ends. having 2 front ends was a historic reason but they cover 2 distinct processes in the system.

I now have the need for using the same module(s) in both front ends. Each has a copy which is fine if nothing changes but when it does I have to apply the changes made (or copy over in its entirety) from one front end to the other.

Although this is no big deal I can forsee it slipping through the net.

Can 2 front ends access the SAME module and if so how?

View 12 Replies View Related

General :: Many Front Ends And Only One Backend

May 7, 2013

I have (on a company network) a FrontEnd .accde and a backend .accdb - currently ~ 10 users (some over wifi - slow!)The FrontEnd is becoming a rather large file ~ 10 MB and is also becoming slower.I am looking to separate this in to 3 FrontEnd files as to simplify and to lessen the file sizes etc.

My question is - are there any issues around a 3 x FrontEnd databases all connecting to 1 x backend database holding all the tables - over a network?

View 11 Replies View Related

How To Create Field Whose Name Ends With A Blank?

Mar 19, 2015

I have a very unusual situation where I need the name of a field in an Access table to end with a blank (i.e. space). I tried doing it trivially while in Design View but no dice. I tried it through some SQL along the lines of the following pseudo code

Select [old table].[Address] as [Address2 ], [old table].*
Into [new table]
From [old table]

but the new field's name "Address2 " lost the final space.A third try was through some syntax for an Alter Table statement to add or modify a field. It didn't pan out.

View 2 Replies View Related

US Daylight Savings Time Ends 4 Nov 2007

Nov 3, 2007

Hi -

Just a reminder that US Daylight Savings Time ends 4 Nov 2007 (First Sunday in November) at 0200, at which point the time (minus Indiana) reverts to 0100.

If getting your PC to cooperate is a problem, you might check the following for guidance:
http://www.uic.edu/depts/accc/systems/daylight/windows.html

Best Wishes - Bob

View 14 Replies View Related

General :: 2 Front Ends And One Table Structure

Sep 10, 2013

I have recently asked about being able to use my table system online. i have just thought. what about creating a front end that works online. still have the front end on the desktop and the table system on the desktop but have both of them connecting to the one table system.

View 8 Replies View Related

General :: How To Link One Front End With Many Back Ends

Mar 8, 2013

i have one front end access database and want to connect with more than one back end at time but both back ends have same table names

View 2 Replies View Related

VBA Code To Search And Replace When String Ends With A Value

Sep 11, 2012

I have the following in Column A

url.com?valueA
url.com?valueA&valueB
url.com?valueC

I need a function that

If string "ends with" valueA or ValueC, then replace it with ValueD

View 2 Replies View Related

Sorting Ends Data Entry Mode

May 14, 2013

I have a form containing a subform. The subform is opened in data entry mode, so it displays no existing records. However if the user right-clicks the form and selects a sort, all records are displayed. Is there any way to stop this behavior so that the form remains in data entry mode?

View 5 Replies View Related

Modules & VBA :: Form Closes Automatically When Code Ends

Aug 27, 2013

I have a combo box that contains a list of values, but users can add their own if they choose. If the value they type in isn't on the list, the Not In List event fires. Once the procedure is done, the form inexplicably closes.

Oddly enough, it only closes under certain circumstances - the code provides several different options for saving the new data, and if I choose different options, the form works as its designed.

Further, if I insert a breakpoint anywhere in the code, then hit F5 to let the code run, the form works fine. Literally, the breakpoint can be anywhere in the procedure from the first line (On Err...) to the last line in the Exit block, "Exit Sub".

View 12 Replies View Related

General :: How To Hide Or Disable The File Tab From Front Ends

Apr 12, 2013

How do I hide or disable the File tab in Access 2010 on my front ends?

The file tab being present allows end user to get into Privacy Options and Printing. Printing is okay if I could disable the Privacy Options for end users, then it wouldn't matter if they have access to the File Tab.

Possible very serious security issue!

View 2 Replies View Related

Forms :: Auto Close Front Ends On A Database?

Aug 9, 2013

I have a split data base and want the front ends to close after a period of time.

View 1 Replies View Related

General :: Linking Front End With Multiple Back Ends

Sep 30, 2014

My question encompasses a front end connected to multiple back ends. It is probably a mundane point, but reading a few articles didn't seem to touch on it.

By this, let me toss out that I am thinking of the personnel where I work when I say 95% have a hard time using email and MS Word, let alone mundane functions like find a file, etc. As such, I have to make my front-ends extremely user friendly.

With that in mind, when developers have multiple back ends, what are thoughts about the best way to relink when required? Even when there are 'more sophisticated' users? Security not an issue or is an issue (inasmuch as can be handled in access)?

Ex: Large corporation with a multitude of user ability. Large database with say 3 different back ends.

I was thinking about keeping a front-end table with each table name and UNC path, hard coding paths to corresponding table names, etc.

Personally I don't have a need for multiple back-ends, but the question came up while reading.

View 7 Replies View Related

Invalid Operation

Apr 21, 2006

I am running a report from a form that is to produce an excel output:

Private Sub cmdTransferToExcel_Click()

On Error GoTo Err_CmdTransferToExcel_Click

Refresh

DoCmd.Hourglass True

DoCmd.OutputTo acOutputQuery, "Temps_Margin_Output", acFormatXLS, [Forms]![Revenue_Output]![output], False


Exit_CmdTransferToExcel_Click:
DoCmd.Hourglass False
MsgBox "File Created", vbOKOnly
Exit Sub

Err_CmdTransferToExcel_Click:
MsgBox Err.Description
Resume Exit_CmdTransferToExcel_Click

End Sub

but receive an error "Invalid Operation"

Can anyone suggest anything?

Thanks

View 1 Replies View Related

Table Operation!!

Mar 12, 2007

hello,

I have a table with "fieldA", "filedB", and "filedC". I want "fieldC" to be the result of multiplying "fieldA" and "filedB". How can I do this?? I don't want to have to type in the result in "fieldC", I want this to be done automatically when I fill up "fieldA" and "filedB."

thank you very much

View 5 Replies View Related

Parameter Operation

Oct 12, 2007

I have a calculated query field that says this:

1 wk Wins: IIf(([1 week price]-[PRICE])/[PRICE]*100>=[s],1,0)

It prompt me for the variable [s] when I run it, as it should.

However, the results for whatever I type for [s] are not the same as the results if I just put the number in the query instead, ie:

1 wk Wins: IIf(([1 week price]-[PRICE])/[PRICE]*100>=5,1,0)

The above should return the same results as if I input 5 for the parameter prompt for [s], but they do not, and I cannot for the life of tell what Access is actually doing with the number I input for [s]. I cannot see a trend in its results from record to record, it just seems random.

Any thoughts on this appreciated.

thanks,
andrew

View 3 Replies View Related

Simulating Telesales Operation

Aug 13, 2006

I have developed a MS-Access application for a small call-center (20 users).with approx 1500 customer-records to call everyday.
What I have done:
There are 20 front-ends residing at the Telecallers desktop and 1 database@server. Presently I am allocating 1500 records (clients send 1500 data everyday) everyday to 20 telecallers so that they get their respective calling details (75 records/telecaller). The no of cases that they need to call is predetermined.
They see cust-details and call up the customer manually.
What I intend to do:
I don’t want to allocate records to telecallers. Instead, when they open the FE-screen they will get the record that is available. (Of course keeping in mind that no particular record is opened by more than 1 telecaller).
Any help in this regard is highly appreciated. Any idea will encourage me to make the application more pro.

View 3 Replies View Related

Help With Structure And Order Of Operation.

Dec 21, 2006

Say I have a table full of tasks. Some tasks are performed each day (Mon-Fri, Friday only, Saturday only, etc). Each day someone has to mark which tasks were not completed, and move those to another table (?). Each task may have small changes to it (length of time, who performs the task, etc.).

There is one person tracking these 350 tasks per day, which they run a report generated from another server that tells them what wasn't completed.

I would like form to be able to show what was completed for the day (by basically subtracting what wasn't completed), as well as for a range of days.

Most of this I can do, but the basic problem is how to generate a "daily" schedule, or a list that he can select what wasn't done? I thought about make a table of days from now until about 2010, and make a query with no relationship so that it assigns a date to each entry (which creates several hundred thousand lines), but that wouldn't do because there can be change that occur for that task for one day or several months.

How does one handle reoccurring events like this? I've gotten fairly good with Access over the past several months, and 90% of what I want to do is no problem, but this one problem, with scheduling, is something I've never been able to figure out. I really need this for 3 separate projects!

The closest I've come is using an append query that pulls a date from a control on a form with a button press, and adds to a list of tasks, but I feel there should be a more elegant (and foolproof) option.

View 2 Replies View Related

Operation Must Use An Updateable Query?

Mar 7, 2006

Hello,

I was hoping someone on this forum might be able to help me.

I am trying to update a table with info in another table, using a nested query.

strSQL = "UPDATE tblTemp SET AdminNum = '" & cboAdmin.Text & "', " & _
"Size = (SELECT Size FROM tblEquipList WHERE AdminNum = '" & cboAdmin.Text & "')"

DoCmd.RunSQL strSQL

cboAdmin is a combo box on my form that is populated by tblEquipList.AdminNum.

When run this gives me:
Runtime Error '3073':
Operation must use an updateable query.

The SELECT statement works by itself, and the first part of the UPDATE (without the nested select) works by itself, but not when I combine them. I also need to update other things in the same manner in which Size is being updated, but when I can get this to work it shouldn't be a problem just added the updates for the other fields in there.

Thanks in advance,
Jeremiah


Edit:
Also, I figured I should add that when I remove the SELECT statment and put in a number (IE: Size = '400'), the query runs just fine. So I know the problem lies in the nesting, but am unsure how.

View 7 Replies View Related

You Canceled The Previous Operation !

Aug 25, 2006

Hi, I've been progamming Access for a couple of years so am not a complete novice but I can't seem to work out this problem.
I downloaded some code from "databasedev.co.uk" from the query section called "Using a Microsoft Access listbox to pass criteria to a query". It works fine. However when I import my own table and change the code to SELECT the imported table and change the WHERE statement to my new string within that table , I get an error. When I select from the list box and click the command button I get the message "You canceled the previous operation".
However if I select the "ALL" selection from the list box it does return all the records.

Any help would be gratefully received!

JeffT

View 1 Replies View Related







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