PC Review


Reply
Thread Tools Rate Thread

After Update problem

 
 
Bob Vance
Guest
Posts: n/a
 
      28th Apr 2009

On my form I have a Email text box to show the clients email address and if
I delete it out it should trigger my check , which it does but it does not
update in my table when deleting out the email address! Only works when I
enter one, I have tried rebooting no difference

Private Sub tbEmail_AfterUpdate()
If ckbBatchInvoice.value = 0 Or IsNull(ckbBatchInvoice.value) Then
ckbBatchInvoice.value = -1
Me.Refresh
End Sub
--
Thanks in advance for any help with this......Bob
MS Access 2007 accdb
Windows XP Home Edition Ver 5.1 Service Pack 3


 
Reply With Quote
 
 
 
 
Jeanette Cunningham
Guest
Posts: n/a
 
      28th Apr 2009
Hi Bob,
If you want it to update the table straight after the checkbox is updated,
without waiting for the form to save the current record, use Me.Requery
instead of Me.Refresh


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Bob Vance" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> On my form I have a Email text box to show the clients email address and
> if I delete it out it should trigger my check , which it does but it does
> not update in my table when deleting out the email address! Only works
> when I enter one, I have tried rebooting no difference
>
> Private Sub tbEmail_AfterUpdate()
> If ckbBatchInvoice.value = 0 Or IsNull(ckbBatchInvoice.value) Then
> ckbBatchInvoice.value = -1
> Me.Refresh
> End Sub
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
>
>



 
Reply With Quote
 
Jeanette Cunningham
Guest
Posts: n/a
 
      28th Apr 2009
If it doesn't suit to do a requery at this stage, you can write code to
update that value in the table.

Private Sub tbEmail_AfterUpdate()
Dim strSQL As String

strSQL = "Update SomeTable " _
& "Set SomeTable.BatchInvoice = True " _
& "Where SomeTable.IDField = " & Me!IDField & ""

If ckbBatchInvoice.value = 0 Or IsNull(ckbBatchInvoice.value) Then
ckbBatchInvoice.value = -1
CurrentDb.Execute strSQL

End Sub

Note: use your own table and field names instead of SomeTable etc.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Bob Vance" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> On my form I have a Email text box to show the clients email address and
> if I delete it out it should trigger my check , which it does but it does
> not update in my table when deleting out the email address! Only works
> when I enter one, I have tried rebooting no difference
>
> Private Sub tbEmail_AfterUpdate()
> If ckbBatchInvoice.value = 0 Or IsNull(ckbBatchInvoice.value) Then
> ckbBatchInvoice.value = -1
> Me.Refresh
> End Sub
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
>
>



 
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
Comodo Firewall update addresses Windows Update problem PA Bear [MS MVP] Windows Vista Security 26 14th Feb 2008 07:05 AM
Comodo Firewall update addresses Windows Update problem PA Bear [MS MVP] Windows Vista General Discussion 25 18th Jan 2008 01:22 AM
Huge problem with security update kb935902 on Windows Update JH Windows Vista General Discussion 13 5th Apr 2007 03:32 PM
Problem with Update Query Returning Message Re Single Row Update =?Utf-8?B?Q2hhcmxlcyBBbGxlbg==?= Microsoft Access Queries 1 6th Dec 2006 06:14 AM
problem afer update 816093: Security Update Microsoft Virtual Machine Karl Windows XP General 2 21st Aug 2004 12:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:29 AM.