A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update record



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2004, 03:01 PM
Brian
external usenet poster
 
Posts: n/a
Default Update record

After a the following code opens a second date box when
required, when I move to the next record, the box is
still open. What do I add to the code?
Any help gratefully accepted!
Thanks
Brian

Private Sub Attended_AfterUpdate()
If Attended = "Rebooked" Then
seconddate.Visible = True
ElseIf Attended = "DNA" Then
seconddate.Visible = True
Else
seconddate.Visible = False
End If
End Sub
  #2  
Old July 9th, 2004, 07:21 PM
Jim Allensworth
external usenet poster
 
Posts: n/a
Default Update record

On Fri, 9 Jul 2004 07:01:34 -0700, "Brian"
wrote:

After a the following code opens a second date box when
required, when I move to the next record, the box is
still open. What do I add to the code?
Any help gratefully accepted!
Thanks
Brian

Private Sub Attended_AfterUpdate()
If Attended = "Rebooked" Then
seconddate.Visible = True
ElseIf Attended = "DNA" Then
seconddate.Visible = True
Else
seconddate.Visible = False
End If
End Sub


If I understand you correctly then use the form's On Current event.
Like ...

Private Sub Form_Current()
Me.seconddate.Visible = Me.Attended = "Rebooked" Or _
Me.Attended = "DNA"
End Sub

- Jim

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
update records Mjohnson Running & Setting Up Queries 3 July 19th, 2004 05:05 PM
Update existing Record and create new record bdehning General Discussion 2 July 5th, 2004 06:46 AM
Update another table with a Max record query Ngan Running & Setting Up Queries 2 June 22nd, 2004 05:01 PM
Update Query specific to Record Kim Running & Setting Up Queries 5 June 16th, 2004 03:24 PM
Update query based on value in a different record of the same table Dale Peart Running & Setting Up Queries 2 June 9th, 2004 12:53 AM


All times are GMT +1. The time now is 12:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.