Implement An Undo For A Subform

Jan 4, 2006

I have a main form (A) with a subform that is another form with a datasheet(A_SUB)

On the form A is an undo button which rewinds any changes that occur to A that I do not wish to commit. However when I make a change to A_SUB the changes are not rewound. I considered implementing an UNDO for A_SUB but this is messy. What would be a better solution?

View Replies


ADVERTISEMENT

Undo On A Subform

Jun 22, 2005

I have a form with a subform, on the mainform there is an undo button but when someone makes changes on the subform the undo button wont run and the error message "The command or action Undo isn't available now". How can i get the mainform to detect that changes have been made on the subform and then if the button is clicked undo the changes.

View 4 Replies View Related

Continuous Subform Undo

Mar 7, 2005

Hi

I have a form and a linked subform which are linked by Purchase Order Number. When items have been delivered on the purchase order, the user should update the continuous subform with the number of items that have been delivered. This works fine.

The problem I have is using an exit button that does not save any of the changes to either the data in the form or the subform. It doesn't matter if there is a prompt to alert the user that there have been changes made.

I have been messing around with DoCmd.RunCommand acCmdUndo in the on click event of my exit button which kind of works when changes has accidentally been made, but is very unsophisticated - any ideas?!

Thanks

Georgina

View 1 Replies View Related

Undo Edit On Subform

Nov 4, 2005

Hi,
Have a main form with subform. Can udo edits on the main form and am trying to do the same for the subform and am having problems. Can someone correct my syntax for me please..........and maybe someday I'll get it!

Here's my code below....thanx.

Private Sub PDEditUndoBut_Click()
On Error GoTo Err_PDEditUndoBut_Click

'Me.Label95.Visible = False
'Me.Label62.Visible = True
Beep
Me.Undo
Me.fmEmergency_Sub.Form.Undo


Exit_PDEditUndoBut_Click:
Exit Sub

Err_PDEditUndoBut_Click:
MsgBox Err.Number, Err.Description
Resume Exit_PDEditUndoBut_Click

End Sub

View 2 Replies View Related

Forms :: Undo All Changes To Form And Subform?

Sep 25, 2013

I have some forms where I can cancel my input. However this works only on the current record. When I implement a subform this does not work anymore. Because access auto saves when focus is set to the subform.

I don't wan't to use unbound forms. What I would like to do is when I press EDIT that a snapshot or something is taken of the current values. So I can set them back.

I can use variables for the main form, but I don't know how to save the values of the records of the subform.

Or does the possibility exist to use transactions?

I just want to be able to undo all changes regardless of the subforms.

View 3 Replies View Related

Modules & VBA :: Undo Method When Using Form And Subform / Lookup Tables

Feb 3, 2015

How come its so hard to create an undo method when using a form and subform, lookup tables and tiered selections in combo boxes?

View 3 Replies View Related

Undo Changes In Subform(in Datasheet View) From A Cick Event Of A Button In Main Form

Aug 5, 2005

Hi everyone!!
This is my first thread in this forum..Hope to get best from this site ..well i m facing a problem..i have a main form and a subform (which is in datasheet view) . Now i have a button called "close_form" in main form on whose click event i have writen this code :

Private Sub close_form_Click()
On Error Resume Next
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me.Controls.Item("fees sub").SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
DoCmd.Close
End Sub

1. If i run this form directly from Access and there are no changes i do in the form and click this button then it gets hang after showing error "run time error 2046 ; the command or action undo is not available now " "press End or Debug or help"

2. As i have created a Custom menu, if i run this form from that menu then it does not show any error. But it runs fine for the first time but nothing happens on clicking this button the second time i open the same form ( in same session).
What to do ?? Please help ..
shikha

View 2 Replies View Related

Undo Won't Undo Last Function.

May 4, 2006

I have a Memo box where the user puts comments and then I have a check box that if check automatically puts a specific phrase on the first line of the Memo box (before any other text currently in the box). What I am trying to do is have it so that if the "check box" is UN-checked it will remove the line that it just added to the Memo box. I have been able to get it to undo everything in the Memo box, but what I really need is for it to just undo the last line of text that was enterd when the user checked the box.

Example:

Memo Box:
This is the line that the checkbox just added when the checkbox is set to "True"
This is the test data the user has already put in the box...
==================

User now UN-checks the checkbox (I want the Memo box to read.. see below) Thereby deleting the line "This is the line that the checkbox just added when the checkbox is set to "True""

Memo Box:
This is the test data the user has already put in the box...

How can I accomplish this?

View 1 Replies View Related

Undo, Won't Undo - Do I Understand Right?

Nov 14, 2006

Hi, I have found the answer to most of my problem, thanks to previous posts.
I am using the Undo command on a Date field. However it seems that my code is maybe not staying on the event to action the undo.

After it runs the Focus goes to the next field Me.LeaveDays and the value is automatically entered, unless I comment back in the Goto's in which case the value will be zero.

I want to be able to Undo the EndDate (and preferable the StartDate, and Setfocus to StartDate) EndDate will do if not possible.

Don't want to Undo the whole form, although that could be a last resort.

My code is in the before_update event, image posted (ignore faded fields, not visible/needed in final solution)
Private Sub EndDate_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_EndDate_BeforeUpdate

Dim intLeaveLeftAL As Integer
Dim intLeaveLeftSL As Integer
Dim intLeaveDays As Integer
Dim dtNullDate As Date
Dim varNullField As Variant

intLeaveLeftAL = Nz(Forms!frmAddLeaveRecords.fsubLeaveAgTots.Form![DailyALInc] - (Forms!frmAddLeaveRecords.fsubLeaveAgTots.Form![ALDays] - Forms!frmAddLeaveRecords.fsubLeaveAgTots.Form![ACDays]), 0)
intLeaveLeftSL = Nz(10 - Forms!frmAddLeaveRecords.fsubLeaveAgTots.Form![SLDays], 0)

' Use the WorkingDays function to calc the number of Leave Days
' set LeaveDays and requery the form
intLeaveDays = WorkingDays(Me.StartDate, Me.EndDate)

If Me.LCode = "LC41" Then ' Sick Leave

Select Case intLeaveDays
Case Is > intLeaveLeftSL
MsgBox "Employee does not have enough Leave" & vbCrLf & "to take as Sick Leave.", vbCritical + vbOKOnly + vbDefaultButton1, "Entry in Error"
varErrorCondition = True
Me.EndDate.Undo
GoTo Exit_EndDate_BeforeUpdate
Case Else:
End Select

ElseIf Me.LCode = "LC11" Or Me.LCode = "LC13c" Then ' Annual or C/Fwd Leave

Select Case intLeaveDays
Case Is > intLeaveLeftAL
MsgBox "Employee does not have enough Leave" & vbCrLf & "to take as Annual Leave.", vbCritical + vbOKOnly + vbDefaultButton1, "Entry in Error"
varErrorCondition = True
Me.EndDate.Undo
GoTo Exit_EndDate_BeforeUpdate
Case Else:
End Select
End If

Me.LeaveDays = intLeaveDays
Me.LeaveDays.Requery
varErrorCondition = False

Exit_EndDate_BeforeUpdate:
Exit Sub

Err_EndDate_BeforeUpdate:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_EndDate_BeforeUpdate

End Sub
The ifs and cases work fine, just like to send the User back a few steps
appreciated :) :)

View 9 Replies View Related

Is There A Way That Could Implement A Loading Bar

Jun 27, 2014

I have a Splash Screen type deal that loads after the user logs in I wanted to know if there was a way that I could add a Loading Bar that would say different things like Are you having a nice day?

View 14 Replies View Related

Implement Barcode System With Access

Feb 1, 2006

Sorry for the flashy post.

1.st Job:
I have an access 2003 db. I want to implement barcode system to the DB in which I can print barcodes in any kind of barcode printer and also when imputing an order read data from barcode scanner etc.

2nd Job:
I want to put access db to a server so I can view reports, forms, imput data and retrive data from internet explorer window (with a password).

I will give my DB to you so you can work on it. Please do the pricing seperate for each job.

Please PM or Reply if you have more than 500 posts. PLEASE RESPOND IF YOU REALLY KNOW HOW TO DO IT.

Thanks in advance.

View 3 Replies View Related

Helps! Cannot Implement Search Using Combo Box

Apr 27, 2006

Who can tell me why I don't have following option in the Combo Box Wizard?
"FIND A RECORD ON MY FORM BASED ON THE VALUE I SELECTED IN MY
COMBO BOX"

I am appreciate!

View 2 Replies View Related

General :: Implement Pop-up Reminder From Within Access

Oct 26, 2012

I'd like to know how to implement a pop-reminder that runs reminding the user of the database of :

1. some to-do actions for the current day or, for example, a week ahead of a certain event, that is related to some date previously entered in a table.

2. this should be within the access database.

3. I saw something like that in the [URL]... website, but actually couldn't understand it.

View 12 Replies View Related

Forms :: Implement Form For Many-to-many Relationship?

May 5, 2014

how to best implement a form for this very simple database (attached). I have a database that keeps track of just first names and colors. Not every first name needs a color assigned to it, and vice versa.

So, I have three tables:

tbFirstnames
First_ID (PK)
First_Name
tbColors
Color_ID (PK)
Color
jctbFirstColor (Junction Table)
First_ID (FK)
Color_ID (FK)

I want my continuous form (fmFirstColor) to show all first name records and have a drop-down to assign a color for each record individually. That's it -- two fields. With this form, I want to be able to create new first name records with or without colors assigned to them, and I want to be able to edit first names and change what colors are assigned for each name.

Again, very simple and small database, but I'm not sure where to run with this. I want to keep everything normalized and within best practice procedures. Is the junction table necessary or can it even be used in this instance?

View 11 Replies View Related

Modules & VBA :: How To Implement Variable In Nested Query

Jun 1, 2014

I have made this sql statement in VBA where rubriek = a variable but I dont know how to implement a variable in a nested query.

SELECT "rubriek, SUM(verkoopprijs) as prijzen
FROM voorwerp
(inner join VoorwerpInRubriek on voorwerp.voorwerpnummer = VoorwerpInRubriek.voorwerp)
inner join Rubriek on rubriek.rubrieknummer = VoorwerpInRubriek.rubriekOpLaagsteNiveau
where rubriek in (select rubrieknummer
from rubriek
where rubriek = variable name
)
group by rubriek"

Do I have to treat it as a normal select query or is there something speical that I have to do ?

View 5 Replies View Related

How To Implement Substitution Variables In Access 2007

Oct 19, 2012

is there a way i can use substitution variables in access 2007, i wrote a query that returns rows which have a word okeu in them but i want to use substitution variables so that i can retrieve any word i want and if the word i want is not there i want to pop a message saying word not there its easier to do it in oracle sqlplus but how can i apply it in access using sql queries? This is my sql i made in access

Code:

SELECT MENU.NAME_REC, MENU.C_REC, AUTO.C_GROUP
FROM MENU, AUTO
WHERE (((MENU.NAME_REC)="okeu"));

View 3 Replies View Related

Queries :: Implement Combination Criteria To Extract Records

Apr 18, 2014

We have the following table.

Code:
ID studentname lectureplace lecturesubject
1 jack A Biology
2 steve A politics
3 jack B math
4 steve A math
5 jack B politics
6 joe A politics
. . . .
. . . .
154 Jane B Geography

We need a query to implement two criteria to extract the following records:

1-Show lectureplace A AND politics lecturesubject
2-Show only those with lectureplace B regardless of the subject

In case the query is run we will have the following result:

Code:
ID studentname lectureplace lecturesubject
2 steve A politics
3 jack B math
5 jack B politics
6 joe A politics

View 1 Replies View Related

How To Secure Passwords Stored On Access Or Implement Server Security Over Jet?

Nov 21, 2007

I'm not sure which is the better of two options-

My problem is I need to make it easy for my users by authenticating themselves once when they open the database. User-level security is adequate for that job, but when I need to use the authentication information for connection string, I'm a bit antsy about storing it somewhere in Access, as I understand that passwords shouldn't be stored in the database itself (and as far as I can tell, it's not even encrypted or hashed!)

I am wondering if converting it to MDE would be sufficient to encrypt the password or will it still be apparent using a hex editor? I also know that Jet can try to use its own security to authenicate to the back-end, but not sure what I need to do to prompt Jet to pass along the credentials.

Alternatively, would it be better to somehow implement login using backend's security model, if even possible?

TIA.

View 14 Replies View Related

General :: How To Implement Query Into Table To Prevent Overlapping Dates

Jun 30, 2014

I'm creating an equipment hire database, and I was wondering how I would not permit overlaps of equipment hire ie. equipment being borrowed before it is returned. I have a query that lists all bookings that overlap, but I am unsure of how to implement this into the table to prevent overlaps.

The SQL for the query is as follows:

SELECT Bookings.[Booking ID], Bookings.[Instrument ID], Bookings.[Borrow Date], Bookings.[Return Date], Bookings_1.[Booking ID], Bookings_1.[Instrument ID], Bookings_1.[Borrow Date], Bookings_1.[Return Date], ([Bookings_1].[Borrow Date]>[Bookings].[Return Date]) Or ([Bookings_1].[Return Date]<[Bookings].[Borrow Date]) Or ([Bookings].[Instrument ID]<>[Bookings_1].[Instrument ID]) Or ([Bookings].[Booking ID]=[Bookings_1].[Booking ID])

[Code]...

View 7 Replies View Related

Undo All Changes

Feb 10, 2005

Is there a way to code something that will say do Undo All changes.
I have a button called Exit without changes…and I would like to be able to undo everything that a user has just done on the form.
Thanks.

View 1 Replies View Related

Undo Changes

Aug 15, 2005

Hi All,

Is there a way that I can make a button which will undo all the changes being made on a form (on multiple records). I have a continious form with a checkbox after each record and want to restore the 'old values' if necessary.

Thanks.

I know it's possible by record, but the tricky part is to do this on multiple records.

View 2 Replies View Related

Undo Conversion From 97 To 2K

Feb 17, 2006

We have an mdb back end on our server with read / write permissions for several approved users. One of them (don't know who yet) has converted the mdb file from 1997 to 2000. Is there a way to undo this? :o (a few have both versions on their machines which is why this was possible to begin to with)

We have had this set up for almost four years now, with no issues might I add but always knew in the back of my mind something like this would happen.

Thanks

View 1 Replies View Related

Check To See If Undo Is Available

Mar 21, 2006

I would like to be able to check to see if undo is available.

ie. i have a button thats called 'Cancel' When clicked it undo's changed and then closes the form, but if there are aren't any changes to undo it flags up an error saying not available.

I would still like it to close the form even if there are no changes to undo.

So check to see if the undo is available then undo and close if not then just close the form.

View 4 Replies View Related

Cancel And Undo

Jun 1, 2006

Hello All,
I am finding this one difficult so felt I should post my issue.
I have status field on my form. It is a bound field.
A combobox - inactive, active.
I wanted the field to do the following when changed
If change then msgbox = Please enter reason in activity notes
a vbYesCancel
If they select it calls the activity notes form - this portion works.
If they select cancel I tried making the field do
form.field.undo (Me.statusid.undo) - something similar
Cancel = True
to reset the field to the original state.
This fails and says my object is not valid
I would be happy to take any suggestions . As always thanks in advance.

View 1 Replies View Related

Undo Command

Aug 30, 2006

Hello,

I use a listbox and a command button on a form as criteria to open another form.

The click event of my cmdbutton has the following code that runs after selecting a record in the listbox:

If IsNull(Me![NAME]) Then
MsgBox "Sorry! No record selected"
Exit Sub
End If

DoCmd.OpenForm ("myform")

I have now created a menu bar and would now like to remove the command button and place it somewhere that can run when I select the menu to open a specific form.

Basically I need that when I select a menu from my menu bar, the code should verify is a record in the listbox has been selected.
If yes, then it will open that form, if not it should run the undo command and not open the form but bring me back to the form on which is placed my listbox (frmEforms).

Any help? Thanks.

View 5 Replies View Related

Forms :: Undo Changes To A From

Apr 28, 2013

I have a form with an undo button which works fine...sometimes.

The issue is if the user hasn't clicked out of the text box they have updated before clicking the undo changes button only the changes they have made to that text box are un-done.

My question is when the user clicks the undo chnages button how do I code it so the changes to the whole form are undone even if they haven't clicked out of the last text box they updated.

View 4 Replies View Related







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