PC Review


Reply
Thread Tools Rate Thread

Change a Error Notice

 
 
Bob
Guest
Posts: n/a
 
      31st Mar 2007

When I Distribute my Invoices from a holding (Button Code below), my list
box then shows a list of this error #Deleted, but they have just been
moved!
So if 10 Invoices are distributed I get 10 errors #Deleted
Thanks for any Help...Bob

Private Sub cmdDistributeAllInvoices_Click()
Dim nRtnValue As Integer

nRtnValue = MsgBox("Are you sure you want to Distribute All Invoices?" &
vbCrLf & vbCrLf & "If you choose Yes, all the Invoices will have Invoice
Numbers.", vbCritical + vbYesNo + vbDefaultButton2, "Distribute all
Invoices")
If nRtnValue = vbYes Then
DoCmd.Hourglass True
subSetInvoiceValues
Application.SysCmd acSysCmdSetStatus, "Process is completed."
Application.SysCmd acSysCmdClearStatus
DoCmd.Hourglass False
End If
End Sub


 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      31st Mar 2007
In news:euki01$ek2$(E-Mail Removed),
Bob <(E-Mail Removed)> wrote:
> When I Distribute my Invoices from a holding (Button Code below), my
> list box then shows a list of this error #Deleted, but they have
> just been moved!
> So if 10 Invoices are distributed I get 10 errors #Deleted
> Thanks for any Help...Bob
>
> Private Sub cmdDistributeAllInvoices_Click()
> Dim nRtnValue As Integer
>
> nRtnValue = MsgBox("Are you sure you want to Distribute All
> Invoices?" & vbCrLf & vbCrLf & "If you choose Yes, all the Invoices
> will have Invoice Numbers.", vbCritical + vbYesNo + vbDefaultButton2,
> "Distribute all Invoices")
> If nRtnValue = vbYes Then
> DoCmd.Hourglass True
> subSetInvoiceValues
> Application.SysCmd acSysCmdSetStatus, "Process is
> completed." Application.SysCmd acSysCmdClearStatus
> DoCmd.Hourglass False
> End If
> End Sub


It sounds like you need to requery your list box after moving the
invoices. I don't know the nameof your list box, but the syntax
(assuming the code is executing on the form containing the list box) is:

Me!NameOfListbox.Requery

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      31st Mar 2007

"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> In news:euki01$ek2$(E-Mail Removed),
> Bob <(E-Mail Removed)> wrote:
>> When I Distribute my Invoices from a holding (Button Code below), my
>> list box then shows a list of this error #Deleted, but they have
>> just been moved!
>> So if 10 Invoices are distributed I get 10 errors #Deleted
>> Thanks for any Help...Bob
>>
>> Private Sub cmdDistributeAllInvoices_Click()
>> Dim nRtnValue As Integer
>>
>> nRtnValue = MsgBox("Are you sure you want to Distribute All
>> Invoices?" & vbCrLf & vbCrLf & "If you choose Yes, all the Invoices
>> will have Invoice Numbers.", vbCritical + vbYesNo + vbDefaultButton2,
>> "Distribute all Invoices")
>> If nRtnValue = vbYes Then
>> DoCmd.Hourglass True
>> subSetInvoiceValues
>> Application.SysCmd acSysCmdSetStatus, "Process is
>> completed." Application.SysCmd acSysCmdClearStatus
>> DoCmd.Hourglass False
>> End If
>> End Sub

>
> It sounds like you need to requery your list box after moving the
> invoices. I don't know the nameof your list box, but the syntax (assuming
> the code is executing on the form containing the list box) is:
>
> Me!NameOfListbox.Requery
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>

Thanks Dirk that it is working when I distribute my Invoices from button the
same form [frmMainMenu] but when I go to another from to Create new invoices
they do not show on [frmMainMenu] still I close my db and re open it. My
List Box is [lstModify]. This list box is on my MainMenu Open form page or I
think is called a switchboard........Thanks for any help....Bob


 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      1st Apr 2007
In news:eumoi4$cef$(E-Mail Removed),
Bob <(E-Mail Removed)> wrote:
> Thanks Dirk that it is working when I distribute my Invoices from
> button the same form [frmMainMenu] but when I go to another from to
> Create new invoices they do not show on [frmMainMenu] still I close
> my db and re open it. My List Box is [lstModify]. This list box is on
> my MainMenu Open form page or I think is called a
> switchboard........Thanks for any help....Bob


If the list box isn't on the form where the code is running, you have to
get at it via a reference to the form containing it. I'm not sure from
your message what the name of that form is, but you might try

Forms!frmMainMenu!lstModify.Requery

or maybe

Forms!Switchboard!lstModify.Requery

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      1st Apr 2007

"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:On%23m9t%(E-Mail Removed)...
> In news:eumoi4$cef$(E-Mail Removed),
> Bob <(E-Mail Removed)> wrote:
>> Thanks Dirk that it is working when I distribute my Invoices from
>> button the same form [frmMainMenu] but when I go to another from to
>> Create new invoices they do not show on [frmMainMenu] still I close
>> my db and re open it. My List Box is [lstModify]. This list box is on
>> my MainMenu Open form page or I think is called a
>> switchboard........Thanks for any help....Bob

>
> If the list box isn't on the form where the code is running, you have to
> get at it via a reference to the form containing it. I'm not sure from
> your message what the name of that form is, but you might try
>
> Forms!frmMainMenu!lstModify.Requery
>
> or maybe
>
> Forms!Switchboard!lstModify.Requery
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>

Thanks Dirk I added this to my close button that takes me back to {frmMain}
and it updates that list box on my Main form....Thanks Bob


 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      2nd Apr 2007

"Bob" <(E-Mail Removed)> wrote in message news:eun0np$r1m$(E-Mail Removed)...
>
> "Dirk Goldgar" <(E-Mail Removed)> wrote in message
> news:On%23m9t%(E-Mail Removed)...
>> In news:eumoi4$cef$(E-Mail Removed),
>> Bob <(E-Mail Removed)> wrote:
>>> Thanks Dirk that it is working when I distribute my Invoices from
>>> button the same form [frmMainMenu] but when I go to another from to
>>> Create new invoices they do not show on [frmMainMenu] still I close
>>> my db and re open it. My List Box is [lstModify]. This list box is on
>>> my MainMenu Open form page or I think is called a
>>> switchboard........Thanks for any help....Bob

>>
>> If the list box isn't on the form where the code is running, you have to
>> get at it via a reference to the form containing it. I'm not sure from
>> your message what the name of that form is, but you might try
>>
>> Forms!frmMainMenu!lstModify.Requery
>>
>> or maybe
>>
>> Forms!Switchboard!lstModify.Requery
>>
>> --
>> Dirk Goldgar, MS Access MVP
>> www.datagnostics.com
>>
>> (please reply to the newsgroup)
>>

> Thanks Dirk I added this to my close button that takes me back to
> {frmMain} and it updates that list box on my Main form....Thanks Bob

Oops Dirk I have a small problem the Listbox [lstModify] it appears on 2
different forms , so how can I combine these 2 scripts so they work, at the
moment I can only get one to show no #Deleted when I delete an Invoice,..
Thanks For any help......Bob

Forms!frmModify!lstModify.Requery
Forms!frmMain!lstModify.Requery


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Notice that there was a change Stefi Microsoft Excel Misc 0 30th Jul 2009 09:57 AM
Change Sound Notice on Appointment John Spence Microsoft Outlook Calendar 1 7th Apr 2008 06:13 PM
Notice of Possible File Change John Gregory Microsoft Excel Discussion 0 18th Sep 2005 03:02 AM
URL change notice dtravers Spyware Discussion 0 7th Jan 2005 10:11 PM
Change notice Gee... Microsoft Excel Programming 1 29th Jun 2004 08:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:23 PM.