Record Change Confirmation

This is a multi-part message in MIME format.

------=_NextPart_000_0081_01CAB184.C1BB7DD0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Access 2007 sp2
I'm using the following code I found on the web, on a Single Form, to =
have the user
choose to either save the record or not save the record or close the
message box and continue editing:

Private Sub cmdSaveAndClose_Click()

If Me.Dirty Then

    Dim BlnOutcome As Integer
    BlnOutcome =3D MsgBox("Record(s) have been added or changed." _
                     & vbCrLf & "Save the Changes?", vbYesNoCancel + =
vbQuestion, "Record Change")
   =20
        Select Case BlnOutcome
   =20
            Case vbCancel
                Me!FieldName.SetFocus
       =20
            Case vbYes
                DoCmd.Close
      =20
            Case vbNo
                Me.Undo
                DoCmd.Close
       =20
        End Select

Else
   =20
    DoCmd.Close
   =20
End If

End Sub

This works ok but I need to figure out what to do if the user hits the =
page-up or
page-down key and moves off the current record.The way it is now if the =
user moves
off the record the record gets saved. I want to be able to choose to =
save or not
but without closing the form when the user goes to another record.
I still want the option to continue to edit the current record even =
though the user
tries to move off the record.

Any help will be appreciated,
James

------=_NextPart_000_0081_01CAB184.C1BB7DD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18882">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial>Access 2007 sp2</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>I'm using the following code I found on =
the web, on=20
a Single Form, to have the user<BR>choose to either save the record or =
not save=20
the record or close the<BR>message box and continue =
editing:</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><BR>Private Sub =
cmdSaveAndClose_Click()</DIV>
<DIV>&nbsp;</DIV>
<DIV>If Me.Dirty Then</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Dim BlnOutcome As Integer<BR>&nbsp;&nbsp;&nbsp;=20
BlnOutcome =3D MsgBox("Record(s) have been added or changed."=20
_<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&amp; vbCrLf &amp; "Save the Changes?", vbYesNoCancel + vbQuestion, =
"Record=20
Change")<BR>&nbsp;&nbsp;&nbsp; =
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Select Case BlnOutcome<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Case=20
vbCancel<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Me!FieldName.SetFocus<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Case=20
vbYes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
DoCmd.Close<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Case=20
vbNo<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;=20
Me.Undo<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
DoCmd.Close<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select</DIV>
<DIV>&nbsp;</DIV>
<DIV>Else<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;=20
DoCmd.Close<BR>&nbsp;&nbsp;&nbsp; <BR>End If</DIV>
<DIV>&nbsp;</DIV>
<DIV>End Sub</DIV>
<DIV>&nbsp;</DIV>
<DIV>This works ok but I need to figure out what to do if the user hits =
the=20
page-up or<BR>page-down key and moves off the current record.The way it =
is now=20
if the user moves<BR>off the record the record gets saved. I want to be =
able to=20
choose to save or not<BR>but without closing the form when the user goes =
to=20
another record.<BR>I still want the option to continue to edit the =
current=20
record even though the user<BR>tries to move off the record.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help will be =
appreciated,<BR>James<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_0081_01CAB184.C1BB7DD0--

0
JamesJ
2/19/2010 9:58:27 PM
access.formscoding 7493 articles. 0 followers. Follow

8 Replies
982 Views

Similar Articles

[PageSpeed] 28

Move the validation code into the BeforeUpdate event procedure of your 
*form*.

That's the only way to ensure that the validation runs regardless of how the 
user saves the record.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
Access 2007 sp2
I'm using the following code I found on the web, on a Single Form, to have 
the user
choose to either save the record or not save the record or close the
message box and continue editing:

Private Sub cmdSaveAndClose_Click()

If Me.Dirty Then

    Dim BlnOutcome As Integer
    BlnOutcome = MsgBox("Record(s) have been added or changed." _
                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
vbQuestion, "Record Change")

        Select Case BlnOutcome

            Case vbCancel
                Me!FieldName.SetFocus

            Case vbYes
                DoCmd.Close

            Case vbNo
                Me.Undo
                DoCmd.Close

        End Select

Else

    DoCmd.Close

End If

End Sub

This works ok but I need to figure out what to do if the user hits the 
page-up or
page-down key and moves off the current record.The way it is now if the user 
moves
off the record the record gets saved. I want to be able to choose to save or 
not
but without closing the form when the user goes to another record.
I still want the option to continue to edit the current record even though 
the user
tries to move off the record.

Any help will be appreciated,
James 

0
Allen
2/19/2010 10:52:52 PM
I considered that but I now have more dilemmas as I thought I would.
The form closes even though I click 'Cancel.' My wish is to be able to
return to the record for editing if I choose 'Cancel.'  Even when I try to 
move
to another record and click 'Cancel' it moves to the next record (if I 
pressed PgDn).
I'm using the 'x' to close the form.

James

"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
> Move the validation code into the BeforeUpdate event procedure of your 
> *form*.
>
> That's the only way to ensure that the validation runs regardless of how 
> the user saves the record.
>
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
> Access 2007 sp2
> I'm using the following code I found on the web, on a Single Form, to have 
> the user
> choose to either save the record or not save the record or close the
> message box and continue editing:
>
> Private Sub cmdSaveAndClose_Click()
>
> If Me.Dirty Then
>
>    Dim BlnOutcome As Integer
>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
> vbQuestion, "Record Change")
>
>        Select Case BlnOutcome
>
>            Case vbCancel
>                Me!FieldName.SetFocus
>
>            Case vbYes
>                DoCmd.Close
>
>            Case vbNo
>                Me.Undo
>                DoCmd.Close
>
>        End Select
>
> Else
>
>    DoCmd.Close
>
> End If
>
> End Sub
>
> This works ok but I need to figure out what to do if the user hits the 
> page-up or
> page-down key and moves off the current record.The way it is now if the 
> user moves
> off the record the record gets saved. I want to be able to choose to save 
> or not
> but without closing the form when the user goes to another record.
> I still want the option to continue to edit the current record even though 
> the user
> tries to move off the record.
>
> Any help will be appreciated,
> James 

0
JamesJ
2/19/2010 11:29:35 PM
Set up the form's BeforeUpdate like this:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
            Cancel = True
        End If
    End Sub

Now in your Cancel'n'close button, just use:
    If Me.Dirty Then Me.Undo
    DoCmd.Close acForm, Me.Name

And in your Save'n'close button:
    If Me.Dirty Then Me.Dirty = False
    DoCmd.Close acForm, Me.Name

Add error handling to the last one. If the save fails (because the user 
didn't confirm or something went wrong), control will pass to the error 
handler, so the form won't close.

If error handling is new, here's some info:
    http://allenbrowne.com/ser-23a.html

The explicit save is necessary due to this bug in Access:
    http://allenbrowne.com/bug-01.html

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
> I considered that but I now have more dilemmas as I thought I would.
> The form closes even though I click 'Cancel.' My wish is to be able to
> return to the record for editing if I choose 'Cancel.'  Even when I try to 
> move
> to another record and click 'Cancel' it moves to the next record (if I 
> pressed PgDn).
> I'm using the 'x' to close the form.
>
> James
>
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>> Move the validation code into the BeforeUpdate event procedure of your 
>> *form*.
>>
>> That's the only way to ensure that the validation runs regardless of how 
>> the user saves the record.
>>
>> -- 
>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>> Access 2007 sp2
>> I'm using the following code I found on the web, on a Single Form, to 
>> have the user
>> choose to either save the record or not save the record or close the
>> message box and continue editing:
>>
>> Private Sub cmdSaveAndClose_Click()
>>
>> If Me.Dirty Then
>>
>>    Dim BlnOutcome As Integer
>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>> vbQuestion, "Record Change")
>>
>>        Select Case BlnOutcome
>>
>>            Case vbCancel
>>                Me!FieldName.SetFocus
>>
>>            Case vbYes
>>                DoCmd.Close
>>
>>            Case vbNo
>>                Me.Undo
>>                DoCmd.Close
>>
>>        End Select
>>
>> Else
>>
>>    DoCmd.Close
>>
>> End If
>>
>> End Sub
>>
>> This works ok but I need to figure out what to do if the user hits the 
>> page-up or
>> page-down key and moves off the current record.The way it is now if the 
>> user moves
>> off the record the record gets saved. I want to be able to choose to save 
>> or not
>> but without closing the form when the user goes to another record.
>> I still want the option to continue to edit the current record even 
>> though the user
>> tries to move off the record.
>>
>> Any help will be appreciated,
>> James
> 
0
Allen
2/20/2010 4:01:07 AM
I believe you've got it!
I did change a couple things
In the Cancel button I don't want the form to close and I didn't want the 
undo
and set the focus to the first field in the form.
And the Before Update works great.

I did discover another, though.
I can also disable the pgup and pgdn keys if the record gets dirty 
preventing
the user form moving off the record.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  ' The Keycode value represents the key that
    ' triggered the event.
    Select Case KeyCode
           ' Check for the PAGE UP and PAGE DOWN keys.
        Case 33, 34

        ' Cancel the keystroke.
        KeyCode = 0
    End Select
End Sub
And the setting the Key Preview to if the record gets dirty in the On Dirty.

Error handling, what's that??
Yes I know I haven't any at all and I will be implementing it here soon.
In fact I have a book with the bookmark at the error handling chapter.

Thanks much,
James

"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
news:uIQBWFesKHA.6004@TK2MSFTNGP04.phx.gbl...
> Set up the form's BeforeUpdate like this:
>    Private Sub Form_BeforeUpdate(Cancel As Integer)
>        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
>            Cancel = True
>        End If
>    End Sub
>
> Now in your Cancel'n'close button, just use:
>    If Me.Dirty Then Me.Undo
>    DoCmd.Close acForm, Me.Name
>
> And in your Save'n'close button:
>    If Me.Dirty Then Me.Dirty = False
>    DoCmd.Close acForm, Me.Name
>
> Add error handling to the last one. If the save fails (because the user 
> didn't confirm or something went wrong), control will pass to the error 
> handler, so the form won't close.
>
> If error handling is new, here's some info:
>    http://allenbrowne.com/ser-23a.html
>
> The explicit save is necessary due to this bug in Access:
>    http://allenbrowne.com/bug-01.html
>
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
>
> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
> news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
>> I considered that but I now have more dilemmas as I thought I would.
>> The form closes even though I click 'Cancel.' My wish is to be able to
>> return to the record for editing if I choose 'Cancel.'  Even when I try 
>> to move
>> to another record and click 'Cancel' it moves to the next record (if I 
>> pressed PgDn).
>> I'm using the 'x' to close the form.
>>
>> James
>>
>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>>> Move the validation code into the BeforeUpdate event procedure of your 
>>> *form*.
>>>
>>> That's the only way to ensure that the validation runs regardless of how 
>>> the user saves the record.
>>>
>>> -- 
>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>> Tips for Access users - http://allenbrowne.com/tips.html
>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>
>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>>> Access 2007 sp2
>>> I'm using the following code I found on the web, on a Single Form, to 
>>> have the user
>>> choose to either save the record or not save the record or close the
>>> message box and continue editing:
>>>
>>> Private Sub cmdSaveAndClose_Click()
>>>
>>> If Me.Dirty Then
>>>
>>>    Dim BlnOutcome As Integer
>>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>>> vbQuestion, "Record Change")
>>>
>>>        Select Case BlnOutcome
>>>
>>>            Case vbCancel
>>>                Me!FieldName.SetFocus
>>>
>>>            Case vbYes
>>>                DoCmd.Close
>>>
>>>            Case vbNo
>>>                Me.Undo
>>>                DoCmd.Close
>>>
>>>        End Select
>>>
>>> Else
>>>
>>>    DoCmd.Close
>>>
>>> End If
>>>
>>> End Sub
>>>
>>> This works ok but I need to figure out what to do if the user hits the 
>>> page-up or
>>> page-down key and moves off the current record.The way it is now if the 
>>> user moves
>>> off the record the record gets saved. I want to be able to choose to 
>>> save or not
>>> but without closing the form when the user goes to another record.
>>> I still want the option to continue to edit the current record even 
>>> though the user
>>> tries to move off the record.
>>>
>>> Any help will be appreciated,
>>> James
>> 

0
JamesJ
2/20/2010 12:00:25 PM
Problem now is the Before Update fires even when I click the SaveAndClose 
button
and before the form closes.
Which is normal but not desirable.

James

"JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
news:OWIbFRisKHA.1476@TK2MSFTNGP02.phx.gbl...
>I believe you've got it!
> I did change a couple things
> In the Cancel button I don't want the form to close and I didn't want the 
> undo
> and set the focus to the first field in the form.
> And the Before Update works great.
>
> I did discover another, though.
> I can also disable the pgup and pgdn keys if the record gets dirty 
> preventing
> the user form moving off the record.
>
> Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
>  ' The Keycode value represents the key that
>    ' triggered the event.
>    Select Case KeyCode
>           ' Check for the PAGE UP and PAGE DOWN keys.
>        Case 33, 34
>
>        ' Cancel the keystroke.
>        KeyCode = 0
>    End Select
> End Sub
> And the setting the Key Preview to if the record gets dirty in the On 
> Dirty.
>
> Error handling, what's that??
> Yes I know I haven't any at all and I will be implementing it here soon.
> In fact I have a book with the bookmark at the error handling chapter.
>
> Thanks much,
> James
>
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
> news:uIQBWFesKHA.6004@TK2MSFTNGP04.phx.gbl...
>> Set up the form's BeforeUpdate like this:
>>    Private Sub Form_BeforeUpdate(Cancel As Integer)
>>        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
>>            Cancel = True
>>        End If
>>    End Sub
>>
>> Now in your Cancel'n'close button, just use:
>>    If Me.Dirty Then Me.Undo
>>    DoCmd.Close acForm, Me.Name
>>
>> And in your Save'n'close button:
>>    If Me.Dirty Then Me.Dirty = False
>>    DoCmd.Close acForm, Me.Name
>>
>> Add error handling to the last one. If the save fails (because the user 
>> didn't confirm or something went wrong), control will pass to the error 
>> handler, so the form won't close.
>>
>> If error handling is new, here's some info:
>>    http://allenbrowne.com/ser-23a.html
>>
>> The explicit save is necessary due to this bug in Access:
>>    http://allenbrowne.com/bug-01.html
>>
>> -- 
>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>>
>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>> news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
>>> I considered that but I now have more dilemmas as I thought I would.
>>> The form closes even though I click 'Cancel.' My wish is to be able to
>>> return to the record for editing if I choose 'Cancel.'  Even when I try 
>>> to move
>>> to another record and click 'Cancel' it moves to the next record (if I 
>>> pressed PgDn).
>>> I'm using the 'x' to close the form.
>>>
>>> James
>>>
>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>>> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>>>> Move the validation code into the BeforeUpdate event procedure of your 
>>>> *form*.
>>>>
>>>> That's the only way to ensure that the validation runs regardless of 
>>>> how the user saves the record.
>>>>
>>>> -- 
>>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>>> Tips for Access users - http://allenbrowne.com/tips.html
>>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>>
>>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>>>> Access 2007 sp2
>>>> I'm using the following code I found on the web, on a Single Form, to 
>>>> have the user
>>>> choose to either save the record or not save the record or close the
>>>> message box and continue editing:
>>>>
>>>> Private Sub cmdSaveAndClose_Click()
>>>>
>>>> If Me.Dirty Then
>>>>
>>>>    Dim BlnOutcome As Integer
>>>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>>>> vbQuestion, "Record Change")
>>>>
>>>>        Select Case BlnOutcome
>>>>
>>>>            Case vbCancel
>>>>                Me!FieldName.SetFocus
>>>>
>>>>            Case vbYes
>>>>                DoCmd.Close
>>>>
>>>>            Case vbNo
>>>>                Me.Undo
>>>>                DoCmd.Close
>>>>
>>>>        End Select
>>>>
>>>> Else
>>>>
>>>>    DoCmd.Close
>>>>
>>>> End If
>>>>
>>>> End Sub
>>>>
>>>> This works ok but I need to figure out what to do if the user hits the 
>>>> page-up or
>>>> page-down key and moves off the current record.The way it is now if the 
>>>> user moves
>>>> off the record the record gets saved. I want to be able to choose to 
>>>> save or not
>>>> but without closing the form when the user goes to another record.
>>>> I still want the option to continue to edit the current record even 
>>>> though the user
>>>> tries to move off the record.
>>>>
>>>> Any help will be appreciated,
>>>> James
>>>
> 

0
JamesJ
2/20/2010 1:42:14 PM
Yes, you can take special action to trap PgUp and PgDown, but there are so 
many ways that trigger a record save that it's no possible to trap them all.

Examples:
- apply a filter
- change the sort order
- press Shift+Enter
- click Save on the ribbon (or Records menu)
- requery the form
- assign a different RecordSource
- tab past the last entry, or shift+tab backwards past the first
- close the form
- close Access
- Alt+F4
and so on.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
news:OWIbFRisKHA.1476@TK2MSFTNGP02.phx.gbl...
> I believe you've got it!
> I did change a couple things
> In the Cancel button I don't want the form to close and I didn't want the 
> undo
> and set the focus to the first field in the form.
> And the Before Update works great.
>
> I did discover another, though.
> I can also disable the pgup and pgdn keys if the record gets dirty 
> preventing
> the user form moving off the record.
>
> Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
>  ' The Keycode value represents the key that
>    ' triggered the event.
>    Select Case KeyCode
>           ' Check for the PAGE UP and PAGE DOWN keys.
>        Case 33, 34
>
>        ' Cancel the keystroke.
>        KeyCode = 0
>    End Select
> End Sub
> And the setting the Key Preview to if the record gets dirty in the On 
> Dirty.
>
> Error handling, what's that??
> Yes I know I haven't any at all and I will be implementing it here soon.
> In fact I have a book with the bookmark at the error handling chapter.
>
> Thanks much,
> James
>
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
> news:uIQBWFesKHA.6004@TK2MSFTNGP04.phx.gbl...
>> Set up the form's BeforeUpdate like this:
>>    Private Sub Form_BeforeUpdate(Cancel As Integer)
>>        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
>>            Cancel = True
>>        End If
>>    End Sub
>>
>> Now in your Cancel'n'close button, just use:
>>    If Me.Dirty Then Me.Undo
>>    DoCmd.Close acForm, Me.Name
>>
>> And in your Save'n'close button:
>>    If Me.Dirty Then Me.Dirty = False
>>    DoCmd.Close acForm, Me.Name
>>
>> Add error handling to the last one. If the save fails (because the user 
>> didn't confirm or something went wrong), control will pass to the error 
>> handler, so the form won't close.
>>
>> If error handling is new, here's some info:
>>    http://allenbrowne.com/ser-23a.html
>>
>> The explicit save is necessary due to this bug in Access:
>>    http://allenbrowne.com/bug-01.html
>>
>> -- 
>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>>
>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>> news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
>>> I considered that but I now have more dilemmas as I thought I would.
>>> The form closes even though I click 'Cancel.' My wish is to be able to
>>> return to the record for editing if I choose 'Cancel.'  Even when I try 
>>> to move
>>> to another record and click 'Cancel' it moves to the next record (if I 
>>> pressed PgDn).
>>> I'm using the 'x' to close the form.
>>>
>>> James
>>>
>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>>> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>>>> Move the validation code into the BeforeUpdate event procedure of your 
>>>> *form*.
>>>>
>>>> That's the only way to ensure that the validation runs regardless of 
>>>> how the user saves the record.
>>>>
>>>> -- 
>>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>>> Tips for Access users - http://allenbrowne.com/tips.html
>>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>>
>>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>>>> Access 2007 sp2
>>>> I'm using the following code I found on the web, on a Single Form, to 
>>>> have the user
>>>> choose to either save the record or not save the record or close the
>>>> message box and continue editing:
>>>>
>>>> Private Sub cmdSaveAndClose_Click()
>>>>
>>>> If Me.Dirty Then
>>>>
>>>>    Dim BlnOutcome As Integer
>>>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>>>> vbQuestion, "Record Change")
>>>>
>>>>        Select Case BlnOutcome
>>>>
>>>>            Case vbCancel
>>>>                Me!FieldName.SetFocus
>>>>
>>>>            Case vbYes
>>>>                DoCmd.Close
>>>>
>>>>            Case vbNo
>>>>                Me.Undo
>>>>                DoCmd.Close
>>>>
>>>>        End Select
>>>>
>>>> Else
>>>>
>>>>    DoCmd.Close
>>>>
>>>> End If
>>>>
>>>> End Sub
>>>>
>>>> This works ok but I need to figure out what to do if the user hits the 
>>>> page-up or
>>>> page-down key and moves off the current record.The way it is now if the 
>>>> user moves
>>>> off the record the record gets saved. I want to be able to choose to 
>>>> save or not
>>>> but without closing the form when the user goes to another record.
>>>> I still want the option to continue to edit the current record even 
>>>> though the user
>>>> tries to move off the record.
>>>>
>>>> Any help will be appreciated,
>>>> James
>>>
> 
0
Allen
2/20/2010 2:11:04 PM
You *don't* always want to query the user about whether to save? You're 
quite happy to silently save in any case except if they click your command 
button?

In that case, I've not understood what you want. Move the code back into the 
button's Click event if you only want the confirmation when they click that 
button.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
news:uLV2DKjsKHA.4360@TK2MSFTNGP05.phx.gbl...
> Problem now is the Before Update fires even when I click the SaveAndClose 
> button
> and before the form closes.
> Which is normal but not desirable.
>
> James
>
> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
> news:OWIbFRisKHA.1476@TK2MSFTNGP02.phx.gbl...
>>I believe you've got it!
>> I did change a couple things
>> In the Cancel button I don't want the form to close and I didn't want the 
>> undo
>> and set the focus to the first field in the form.
>> And the Before Update works great.
>>
>> I did discover another, though.
>> I can also disable the pgup and pgdn keys if the record gets dirty 
>> preventing
>> the user form moving off the record.
>>
>> Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
>>  ' The Keycode value represents the key that
>>    ' triggered the event.
>>    Select Case KeyCode
>>           ' Check for the PAGE UP and PAGE DOWN keys.
>>        Case 33, 34
>>
>>        ' Cancel the keystroke.
>>        KeyCode = 0
>>    End Select
>> End Sub
>> And the setting the Key Preview to if the record gets dirty in the On 
>> Dirty.
>>
>> Error handling, what's that??
>> Yes I know I haven't any at all and I will be implementing it here soon.
>> In fact I have a book with the bookmark at the error handling chapter.
>>
>> Thanks much,
>> James
>>
>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>> news:uIQBWFesKHA.6004@TK2MSFTNGP04.phx.gbl...
>>> Set up the form's BeforeUpdate like this:
>>>    Private Sub Form_BeforeUpdate(Cancel As Integer)
>>>        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
>>>            Cancel = True
>>>        End If
>>>    End Sub
>>>
>>> Now in your Cancel'n'close button, just use:
>>>    If Me.Dirty Then Me.Undo
>>>    DoCmd.Close acForm, Me.Name
>>>
>>> And in your Save'n'close button:
>>>    If Me.Dirty Then Me.Dirty = False
>>>    DoCmd.Close acForm, Me.Name
>>>
>>> Add error handling to the last one. If the save fails (because the user 
>>> didn't confirm or something went wrong), control will pass to the error 
>>> handler, so the form won't close.
>>>
>>> If error handling is new, here's some info:
>>>    http://allenbrowne.com/ser-23a.html
>>>
>>> The explicit save is necessary due to this bug in Access:
>>>    http://allenbrowne.com/bug-01.html
>>>
>>> -- 
>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>> Tips for Access users - http://allenbrowne.com/tips.html
>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>
>>>
>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>> news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
>>>> I considered that but I now have more dilemmas as I thought I would.
>>>> The form closes even though I click 'Cancel.' My wish is to be able to
>>>> return to the record for editing if I choose 'Cancel.'  Even when I try 
>>>> to move
>>>> to another record and click 'Cancel' it moves to the next record (if I 
>>>> pressed PgDn).
>>>> I'm using the 'x' to close the form.
>>>>
>>>> James
>>>>
>>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>>>> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>>>>> Move the validation code into the BeforeUpdate event procedure of your 
>>>>> *form*.
>>>>>
>>>>> That's the only way to ensure that the validation runs regardless of 
>>>>> how the user saves the record.
>>>>>
>>>>> -- 
>>>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>>>> Tips for Access users - http://allenbrowne.com/tips.html
>>>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>>>
>>>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>>>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>>>>> Access 2007 sp2
>>>>> I'm using the following code I found on the web, on a Single Form, to 
>>>>> have the user
>>>>> choose to either save the record or not save the record or close the
>>>>> message box and continue editing:
>>>>>
>>>>> Private Sub cmdSaveAndClose_Click()
>>>>>
>>>>> If Me.Dirty Then
>>>>>
>>>>>    Dim BlnOutcome As Integer
>>>>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>>>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>>>>> vbQuestion, "Record Change")
>>>>>
>>>>>        Select Case BlnOutcome
>>>>>
>>>>>            Case vbCancel
>>>>>                Me!FieldName.SetFocus
>>>>>
>>>>>            Case vbYes
>>>>>                DoCmd.Close
>>>>>
>>>>>            Case vbNo
>>>>>                Me.Undo
>>>>>                DoCmd.Close
>>>>>
>>>>>        End Select
>>>>>
>>>>> Else
>>>>>
>>>>>    DoCmd.Close
>>>>>
>>>>> End If
>>>>>
>>>>> End Sub
>>>>>
>>>>> This works ok but I need to figure out what to do if the user hits the 
>>>>> page-up or
>>>>> page-down key and moves off the current record.The way it is now if 
>>>>> the user moves
>>>>> off the record the record gets saved. I want to be able to choose to 
>>>>> save or not
>>>>> but without closing the form when the user goes to another record.
>>>>> I still want the option to continue to edit the current record even 
>>>>> though the user
>>>>> tries to move off the record.
>>>>>
>>>>> Any help will be appreciated,
>>>>> James
>>>>
>>
> 
0
Allen
2/20/2010 2:12:28 PM
Didn't realize so many things can save a record.
One of the main things I wanted to happen is to be able to stay on the 
record
and continue to edit it whether I inadvertently try to move off the record 
or
close the form and decide I didn't make all the changes I wanted.
I believe trapping the pgup and pgdn is working out ok for my needs.

Thanks much,
James

"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
news:uoTk%23ajsKHA.5976@TK2MSFTNGP05.phx.gbl...
> You *don't* always want to query the user about whether to save? You're 
> quite happy to silently save in any case except if they click your command 
> button?
>
> In that case, I've not understood what you want. Move the code back into 
> the button's Click event if you only want the confirmation when they click 
> that button.
>
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
>
> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
> news:uLV2DKjsKHA.4360@TK2MSFTNGP05.phx.gbl...
>> Problem now is the Before Update fires even when I click the SaveAndClose 
>> button
>> and before the form closes.
>> Which is normal but not desirable.
>>
>> James
>>
>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>> news:OWIbFRisKHA.1476@TK2MSFTNGP02.phx.gbl...
>>>I believe you've got it!
>>> I did change a couple things
>>> In the Cancel button I don't want the form to close and I didn't want 
>>> the undo
>>> and set the focus to the first field in the form.
>>> And the Before Update works great.
>>>
>>> I did discover another, though.
>>> I can also disable the pgup and pgdn keys if the record gets dirty 
>>> preventing
>>> the user form moving off the record.
>>>
>>> Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
>>>  ' The Keycode value represents the key that
>>>    ' triggered the event.
>>>    Select Case KeyCode
>>>           ' Check for the PAGE UP and PAGE DOWN keys.
>>>        Case 33, 34
>>>
>>>        ' Cancel the keystroke.
>>>        KeyCode = 0
>>>    End Select
>>> End Sub
>>> And the setting the Key Preview to if the record gets dirty in the On 
>>> Dirty.
>>>
>>> Error handling, what's that??
>>> Yes I know I haven't any at all and I will be implementing it here soon.
>>> In fact I have a book with the bookmark at the error handling chapter.
>>>
>>> Thanks much,
>>> James
>>>
>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>>> news:uIQBWFesKHA.6004@TK2MSFTNGP04.phx.gbl...
>>>> Set up the form's BeforeUpdate like this:
>>>>    Private Sub Form_BeforeUpdate(Cancel As Integer)
>>>>        If MsgBox("Save?", vbOkCancel, "Confirm") <> vbOk Then
>>>>            Cancel = True
>>>>        End If
>>>>    End Sub
>>>>
>>>> Now in your Cancel'n'close button, just use:
>>>>    If Me.Dirty Then Me.Undo
>>>>    DoCmd.Close acForm, Me.Name
>>>>
>>>> And in your Save'n'close button:
>>>>    If Me.Dirty Then Me.Dirty = False
>>>>    DoCmd.Close acForm, Me.Name
>>>>
>>>> Add error handling to the last one. If the save fails (because the user 
>>>> didn't confirm or something went wrong), control will pass to the error 
>>>> handler, so the form won't close.
>>>>
>>>> If error handling is new, here's some info:
>>>>    http://allenbrowne.com/ser-23a.html
>>>>
>>>> The explicit save is necessary due to this bug in Access:
>>>>    http://allenbrowne.com/bug-01.html
>>>>
>>>> -- 
>>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>>> Tips for Access users - http://allenbrowne.com/tips.html
>>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>>
>>>>
>>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>>> news:uN0VitbsKHA.3536@TK2MSFTNGP06.phx.gbl...
>>>>> I considered that but I now have more dilemmas as I thought I would.
>>>>> The form closes even though I click 'Cancel.' My wish is to be able to
>>>>> return to the record for editing if I choose 'Cancel.'  Even when I 
>>>>> try to move
>>>>> to another record and click 'Cancel' it moves to the next record (if I 
>>>>> pressed PgDn).
>>>>> I'm using the 'x' to close the form.
>>>>>
>>>>> James
>>>>>
>>>>> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message 
>>>>> news:%23fztGZbsKHA.3908@TK2MSFTNGP05.phx.gbl...
>>>>>> Move the validation code into the BeforeUpdate event procedure of 
>>>>>> your *form*.
>>>>>>
>>>>>> That's the only way to ensure that the validation runs regardless of 
>>>>>> how the user saves the record.
>>>>>>
>>>>>> -- 
>>>>>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>>>>>> Tips for Access users - http://allenbrowne.com/tips.html
>>>>>> Reply to group, rather than allenbrowne at mvps dot org.
>>>>>>
>>>>>> "JamesJ" <jjy@darwin_roadrunner.com> wrote in message 
>>>>>> news:%23eZYn6asKHA.1796@TK2MSFTNGP02.phx.gbl...
>>>>>> Access 2007 sp2
>>>>>> I'm using the following code I found on the web, on a Single Form, to 
>>>>>> have the user
>>>>>> choose to either save the record or not save the record or close the
>>>>>> message box and continue editing:
>>>>>>
>>>>>> Private Sub cmdSaveAndClose_Click()
>>>>>>
>>>>>> If Me.Dirty Then
>>>>>>
>>>>>>    Dim BlnOutcome As Integer
>>>>>>    BlnOutcome = MsgBox("Record(s) have been added or changed." _
>>>>>>                     & vbCrLf & "Save the Changes?", vbYesNoCancel + 
>>>>>> vbQuestion, "Record Change")
>>>>>>
>>>>>>        Select Case BlnOutcome
>>>>>>
>>>>>>            Case vbCancel
>>>>>>                Me!FieldName.SetFocus
>>>>>>
>>>>>>            Case vbYes
>>>>>>                DoCmd.Close
>>>>>>
>>>>>>            Case vbNo
>>>>>>                Me.Undo
>>>>>>                DoCmd.Close
>>>>>>
>>>>>>        End Select
>>>>>>
>>>>>> Else
>>>>>>
>>>>>>    DoCmd.Close
>>>>>>
>>>>>> End If
>>>>>>
>>>>>> End Sub
>>>>>>
>>>>>> This works ok but I need to figure out what to do if the user hits 
>>>>>> the page-up or
>>>>>> page-down key and moves off the current record.The way it is now if 
>>>>>> the user moves
>>>>>> off the record the record gets saved. I want to be able to choose to 
>>>>>> save or not
>>>>>> but without closing the form when the user goes to another record.
>>>>>> I still want the option to continue to edit the current record even 
>>>>>> though the user
>>>>>> tries to move off the record.
>>>>>>
>>>>>> Any help will be appreciated,
>>>>>> James
>>>>>
>>>
>> 

0
JamesJ
2/20/2010 3:44:05 PM
Reply:

Similar Artilces:

VBA Opening worksheet, name changes
I have a VBA code - that opens a worksheet, then gets data. The problem is that the worksheet name can change, then it won't open. Is there anyway to save the worksheet name as some variable, that can reference the worksheet name/location + will automatically update? Thanks Use the codename not the Excel name. This is usually the same, Sheet1, Sheet2, etc, but it doesn't change if the user changes the Excel name. You use it like Sheet1.Range("A1") instead of Worksheets("Sheet1").Range("A1") -- HTH Bob Phillips "Jeff" <Jeff@di...

Publishing Form Changes via Web Access
Hi I access CRM 1.2 via the web. In the past I have made changes to forms and they have appeared when I save and close. This no longer happens. Our IT support have restarted IIS but to no avail. Can anyone help please? Thanks Adam Hello AdamG, Have you published your changes before restarting IIS? In 1.2, only altering views and picklists showed up dynamically. Any form changes must be pulbished in the Deployment Mananger first. Kind Regards Eddie Fourie MBS Specialist A> Hi A> A> I access CRM 1.2 via the web. In the past I have made changes to A> forms and they have...

Change 'fullname'
I want to change 'fullname' because it's not showing the middlename of a contactperson. It only merges firstname + lastname. How can I edit the fullname var? This is controlled via one of the sytem settings. You can pick from several name formats for Fullname. This will not affect existing records though. To update those, you will need to either manually touch the name on each record or use a SQL query to update it. Note, the query is unsupported, but should not cause problems if you are careful. -- Matt Parks MVP - Microsoft CRM "AmonRa" <AmonRa@discuss...

Default "File Origin" is wrong (Japanese)
Excel2002 /Win2K Hi If I save a spreadsheet to "tab delimited text" format and thne re-open it, always defaults the "file origin" to be "932:Japanese (Shift-JIS)" instead of "1252:Western European (Windows)"! How do I get my MS Excel to default to the correct thing?! Ship Shiperton Henethe ...

Create a new Parts record from an exiting one
I would like to create a form that prompts for an EXISTING part number record in my tblParts and then creates a NEW part record for a prompted NEW part number. All of the existing field values would be "copied" to the new part record. I have looked around for a solution to this but have had no luck. Can anyone point me to some examples of this? -- Peter Marshall Manager Information Services Ohio Coatings Company (740) 859-5560 office (304) 281-7404 cell Peter, how about adding an unbound combo to the top of your form, where the user selects the part they want to copy. Th...

Emailing Current Record
Hello all, I have a form that must be sent by email to a predetermined person once it is completed. It is important, however, that only the current record be sent. Is there a way to automate this by creating a Command Button? The Access Wizard creates the following code to allow you to print the form showing the current record. However, the Wizard it does not offer an option to email the current record. Private Sub Print_Current_Record_Click() On Error GoTo Err_Print_Current_Record_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.PrintOut acSelec...

What settings needs changed in order to merge from an access data.
I had created a certificate in publisher and was merging the names from a query in access. The techical support center upgraded our machines and now the merge will not work. What settings should I check to make this work again? ...

Tag records where a certain field contains all Uppercase Letters.
Is there a way to tag records where a certain field has letters that are all Capitalized? It's a long story but this is a very raw dataset and all the values in a column that are all capitalized represent the Company Name and I need to isolate all these records and pull them out of the dataset. Thanks, Ken =?Utf-8?B?S1BS?= <KPR@discussions.microsoft.com> wrote in news:687D324E-3F7A-47CF-900F-4869F2E83F41@microsoft.com: > Is there a way to tag records where a certain field has letters > that are all Capitalized? It's a long story but this is a very raw > dataset an...

Deleting records in CRM 4.0
Hi, One of my major issues with CRM is the inability to delete records. We have a development setup and hence now have lots of 'test' data that is clogging up the system and needs to be removed. We have Contract Templates and Contracts that need to be deleted but I am unable to find a way of doing this. I find it unreasonable that once you have saved a Contract Template you can no longer edit it, so if you made a mistake you have to delete it and re-create it, unfortunately if you have applied it to a Contract first and then made that Contract Active before you spotted your mistake yo...

How to combine Excel 2002 files and remove duplicate records?
I’ve recently took over a task at my job of managing some Excel files. I am using Excel 2002. There are several Excel files that need to be combined into one file however, if I do this, I will have some duplicate records that I will have to delete. The only way I know how to do this is to copy and paste and then look for duplicate records manually and delete them as I find them. Is there an easier way to do this? Thank you for you support and help. Yes, there is. I would use VBA to do that job, but I need more info. When you say there are duplicate records, exactly what is duplicated? ...

Chart scale automatically changing in ppt2007
I have a stacked bar chart that I update daily. Often when I update the datasheet, it automatically changes the scale of the graph on me. This is a problem because I have items that are not part of the actual chart but that I've added to it on the slide, such as carots pointing to the bars at certain heights. It seems that if I make the bars taller than some undefined threshold, it makes the chart change size and throws everything off. When I increase the numbers in the datasheet, I just want the bar to get taller, not change scale. Any suggestions how to make it stop changin...

Only Exporting 16384 records with Office '02 and Excel '03
How come it only lets me export this many records with the newer versions?????? My original long answer seems to be lost. In a nutshell, don't use OutPutTo. Instead using TransferSpreadsheet instead. You can readily chose which version of Excel for the export. if memory serves, acSpreadsheetTypeExcel9 will allow 64K of records. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryA", "n:\qryA.xls", True -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Schwimms" wrote: > How com...

Changing CRM Server IP Address
Hi, We have Installed CRM 1.2 on SBS 2003 and it worked OK. Have had to change the server IP address. After doing this CRM won't start up - typing the old CRM URL now brings up the default companyweb site. Any suggestions on how to get CRM going again - or do we need to re-install CRM Thanks Robin Dexter Hi Ropbin, I would check two things 1. Try unregistering and registering the CRM security service. - To unregister type “crmsecurityservice.exe –u” without the quotes in the command prompt window and press enter. This may take a few seconds to complete and will display text wh...

How do I change the default html editor?
Somehow Publisher got designated the default web editor, which husband uses, but I use Front Page and now can't get Front Page to work properly. Does anyone know how to UNselect a default editor? Thanks in advance for any help. Chris Swilley In Internet Explorer, Tools - Internet Options - Programs tab. -- JoAnn Paules MVP Microsoft [Publisher] "Chris Swilley" <Chris Swilley@discussions.microsoft.com> wrote in message news:3B7CA614-B8AD-499A-99A3-959877D7FCBE@microsoft.com... > Somehow Publisher got designated the default web editor, which husband > use...

Get/Change Operation on SY_ResourceActivity
I am running Dynamics on SQL. I physically deleted SY00800 & SY008001 manually rather than running the delete query on the tables. Therefore, when I try to log into Dynamics now and get to choosing which company I want to use, I get an error message that is a get/change operation error on SY_ResourceActivity. Does some have the queries to recreate these tables, or is there another solution to this problem. I cannot find any solution to it on CustomerSource. Can you not restore your Dynamics database? That is your best option. Use at your own risk... this is from GP 8.0 CREATE T...

change stage of sales process
Hi All, We have defined sales process in MSCRM, and we have a requirements that only manager can change the sales process stage from current stage to the next stage, how can we do that in MSCRM ? Because if we try to complete all the activities in the current stage, it will automatically change the stage to the next stage. We want to do it manually. Your advices, helps or guidances on this matter is really appreciated. Thanks for your help before. Kind regards, William maybe you should have a task that says contact manager for approval. This signals the user to call the manager and s...

Change address and phonenumber to contacts in "new case" window.
If I am in the middle of creating a new case and talks with the customer on the phone...I wants to be able to change the customers address, phonenumber, computername, username....and so on in the New case window. I've got no time to find the contact and update this information and then back to the New case window and type in the customers problem. But I want to be able to change this information in both ways. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree&...

Create Table after a record is inserted
Hi, I have a table with the name of all my suppliers. Every time I add a new supplier I want a table with a standard structure and name of the spesific supplier to be created. Is it possible to be done? Thank you, Leon So you want a table for every supplier or you want the suppliertable constantly duplicated. I don't think that's following the normalization rules and you might be in a lot of trouble with maintenance on your db. -- Maurice Ausum "Leonidas" wrote: > Hi, > > I have a table with the name of all my suppliers. Every time I add a new > supp...

CHANGING INVOICE DUE DATE
Hello: I need change an invoice due date. Can anyone tell me how to do this? Just for clarification I am not trying to change the invoice date but rather when the invoice due date. When I update the ship date this is not reflected anywhere on my invoice. It doesn't appear to be an option on the invoice designer either. Thanks in advance for your time. Bryan Hi Brian, I´m experiencing the same problem, and yet another one that may be yours too. How to change the payment terms?? Someone, enlight us please. Felipe "BCM" wrote: > Hello: > > I need change...

Can i change my smtp server?
hi guys If i look in my queues i see a smtp connector. it shows like internal Domain - (ip adress)[SMTP connector] and Internet Connector(ip adress)[SMTP connector]. if i want to use a different smtp connector where do i change that. i need to use the smtp connector of my ISP and not of the mail hosting company anymore.Is this possible? i hav exc2003 sp2 thanks On Mon, 11 Sep 2006 12:30:52 +0200, "expres account" <express(removethis) AT tourismcapetown.co.za> wrote: >hi guys > >If i look in my queues i see a smtp connector. it shows like internal >Domai...

How do I change the width of an individual cell?
I am trying to adjust the width of an individual cell and all I am able to do is adjust the width of the entire column. Any suggestions? Thank you That is all you can do. Ola "Tabitha" <Tabitha@discussions.microsoft.com> skrev i meddelandet news:E138E608-96BB-4888-B886-36598D36E3CF@microsoft.com... >I am trying to adjust the width of an individual cell and all I am able to >do > is adjust the width of the entire column. Any suggestions? > > Thank you You can select two or more cells and merge them (Format>Cells, Alignment tab) However, this can cau...

Outlook 2003: You do not have permission to change the current timezone
Hi All, Here is my current setup: OS: Vista Business 32-bit Outlook: 2003 Server Env.: POP3, no exchange server When I try to change the current timezone, I get the error "You do not have permission to change the current timezone". I was able to do that when I have Windows XP. I've already disabled the user access control but it is still NOT ok. Can anyone give me some hints? Thanks. are you changing it within outlook's time zone dialog or vista's? did you upgrade vista over xp? are you logged in with a user or admin acct? if a user acct, open the control pa...

change font in calendar
Is there a way to change the font to use in Calendar? Which font/feature do you want to change? Some are controled by right clicking on the calendar and choosing Other settings. Appointments can use automatic formatting in views. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM How man...

JavaScript: Change Contact for Case
Hi guys, I am pretty new to CRM, so please have a bit of patience :-) I have a custom "contact select" .aspx page which I render in an IFrame when my user opens a new Case. I need to set the Case's Contact to what the user selects in my custom selection via JavaScript. At this stage I am trying the following: var crmForm = window.parent.document.getElementById('crmForm'); crmForm.all.customerid.DataValue = rowSelectedId; where rowSelectedId is the customerid the user selected. Why can't I set the DataValue of customerid in this way, and how could I do it?...

Overriding a variable
(Not sure if this is a general C++ question, but all I have is MVC++ so I can't compare) I've subclassed a class and created a member variable of the subclass with the same name (different type) as a member variable of the base class. It treats the variable as the base type in the base class member functions and as the subclassed type in the subclassed member functions. Is there a way to force the bass class to see that member variable as the subclassed type? Thank you. Yasoo, This is where you create virtual getters/setters :-) Johan Rosengren Abstrakt Mekanik AB "Yasoo&q...