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  

Continuous Forms Question



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2010, 07:25 AM posted to microsoft.public.access.forms
Anatoly Kurilin
external usenet poster
 
Posts: 21
Default Continuous Forms Question

Hi, I have two similar subforms connected to two different tables. Each
subform has a textbox control. I have to check its contents in the event
BeforeUpdate. So, when a NEW RECORD is created, the first subform behaves
quite normal: after the message, I run command Cancel = True and if the user
presses Escape button, the textbox gets empty. But the second subform
behaves in a bit different way: when the user presses Escape button, the
whole content of that textbox just gets marked, giving the way to move to
the next control by pressing Tab and passing the checkup. What's wrong with
the second subform? Actually they are twins...

Thanks in advance,
AK



__________ Information from ESET NOD32 Antivirus, version of virus signature database 5113 (20100513) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml




  #2  
Old May 14th, 2010, 12:16 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Continuous Forms Question

Details needed. You mention a message, an Escape button, and Cancel = True,
but without seeing the code there is no context. Also, which Before Update
event are you talking about: the form or the control?

Anatoly Kurilin wrote:
Hi, I have two similar subforms connected to two different tables. Each
subform has a textbox control. I have to check its contents in the event
BeforeUpdate. So, when a NEW RECORD is created, the first subform behaves
quite normal: after the message, I run command Cancel = True and if the user
presses Escape button, the textbox gets empty. But the second subform
behaves in a bit different way: when the user presses Escape button, the
whole content of that textbox just gets marked, giving the way to move to
the next control by pressing Tab and passing the checkup. What's wrong with
the second subform? Actually they are twins...

Thanks in advance,
AK

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5113 (20100513) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via http://www.accessmonster.com

  #3  
Old May 14th, 2010, 05:56 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Continuous Forms Question

What code is in the control's Before Update event?

Anatoly Kurilin wrote:
I'm talking about the control's Before Update event.

Details needed. You mention a message, an Escape button, and Cancel =
True,

[quoted text clipped - 23 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

  #4  
Old May 14th, 2010, 06:40 PM posted to microsoft.public.access.forms
Anatoly Kurilin
external usenet poster
 
Posts: 21
Default Continuous Forms Question

I'm talking about the control's Before Update event.

"BruceM via AccessMonster.com" u54429@uwe wrote in message
news:a7fd10bb9be30@uwe...
Details needed. You mention a message, an Escape button, and Cancel =
True,
but without seeing the code there is no context. Also, which Before
Update
event are you talking about: the form or the control?

Anatoly Kurilin wrote:
Hi, I have two similar subforms connected to two different tables. Each
subform has a textbox control. I have to check its contents in the event
BeforeUpdate. So, when a NEW RECORD is created, the first subform behaves
quite normal: after the message, I run command Cancel = True and if the
user
presses Escape button, the textbox gets empty. But the second subform
behaves in a bit different way: when the user presses Escape button, the
whole content of that textbox just gets marked, giving the way to move to
the next control by pressing Tab and passing the checkup. What's wrong
with
the second subform? Actually they are twins...

Thanks in advance,
AK

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5113 (20100513) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via http://www.accessmonster.com


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml






__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml




  #5  
Old May 14th, 2010, 07:12 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Continuous Forms Question

OK, what is gCustomerInitials? Seems to be a user-defined function, but what
is its code?

Anatoly Kurilin wrote:
Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)
If gCustomerInitials(txtMasterField.Value, True) = "" Then
Cancel = True
End If
End Sub

What code is in the control's Before Update event?

[quoted text clipped - 12 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

  #6  
Old May 14th, 2010, 07:27 PM posted to microsoft.public.access.forms
Anatoly Kurilin
external usenet poster
 
Posts: 21
Default Continuous Forms Question


Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)
If gCustomerInitials(txtMasterField.Value, True) = "" Then
Cancel = True
End If
End Sub


"BruceM via AccessMonster.com" u54429@uwe wrote in message
news:a80008d538ef4@uwe...
What code is in the control's Before Update event?

Anatoly Kurilin wrote:
I'm talking about the control's Before Update event.

Details needed. You mention a message, an Escape button, and Cancel =
True,

[quoted text clipped - 23 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml






__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml




  #7  
Old May 14th, 2010, 08:18 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Continuous Forms Question

It seems that if the length of the entry in the field is greater than 10
characters you want to cancel the entry. Why not just limit the field size
to 10 characters? Anyhow, if you want to remove the entry you need to add:
Me.txtMasterField.Undo

Anatoly Kurilin wrote:
To make the investigation easier, I've changed the code but of no avail ...

Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)

If Len(txtMasterField.Value) 10 Then
Beep
Cancel = True
End If

End Sub

OK, what is gCustomerInitials? Seems to be a user-defined function, but
what

[quoted text clipped - 18 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

  #8  
Old May 14th, 2010, 08:41 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Continuous Forms Question

So you're saying that in your most recent example if the user makes an entry
of greater than 10 characters the code doesn't stop them?

Anatoly Kurilin wrote:
As a matter of fact, I limited the length of the entry as an example of any
cancelled action. And I don't want to remove the entry - user has to see
what he/she entered. All I want is to make the control to behave in a proper
way - there mustn't be any way to bypass the command Cancel = True.

It seems that if the length of the entry in the field is greater than 10
characters you want to cancel the entry. Why not just limit the field

[quoted text clipped - 27 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

  #9  
Old May 14th, 2010, 08:44 PM posted to microsoft.public.access.forms
Anatoly Kurilin
external usenet poster
 
Posts: 21
Default Continuous Forms Question

To make the investigation easier, I've changed the code but of no avail ...


Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)

If Len(txtMasterField.Value) 10 Then
Beep
Cancel = True
End If

End Sub




"BruceM via AccessMonster.com" u54429@uwe wrote in message
news:a800b4b0d9340@uwe...
OK, what is gCustomerInitials? Seems to be a user-defined function, but
what
is its code?

Anatoly Kurilin wrote:
Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)
If gCustomerInitials(txtMasterField.Value, True) = "" Then
Cancel = True
End If
End Sub

What code is in the control's Before Update event?

[quoted text clipped - 12 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml






__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml




  #10  
Old May 14th, 2010, 09:33 PM posted to microsoft.public.access.forms
Anatoly Kurilin
external usenet poster
 
Posts: 21
Default Continuous Forms Question

As a matter of fact, I limited the length of the entry as an example of any
cancelled action. And I don't want to remove the entry - user has to see
what he/she entered. All I want is to make the control to behave in a proper
way - there mustn't be any way to bypass the command Cancel = True.

"BruceM via AccessMonster.com" u54429@uwe wrote in message
news:a801471a84590@uwe...
It seems that if the length of the entry in the field is greater than 10
characters you want to cancel the entry. Why not just limit the field
size
to 10 characters? Anyhow, if you want to remove the entry you need to
add:
Me.txtMasterField.Undo

Anatoly Kurilin wrote:
To make the investigation easier, I've changed the code but of no avail
...

Private Sub txtMasterField_BeforeUpdate(Cancel As Integer)

If Len(txtMasterField.Value) 10 Then
Beep
Cancel = True
End If

End Sub

OK, what is gCustomerInitials? Seems to be a user-defined function, but
what

[quoted text clipped - 18 lines]

http://www.esetnod32.ru/.ml


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml






__________ Information from ESET NOD32 Antivirus, version of virus signature database 5115 (20100514) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru/.ml




 




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


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


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