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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access 2003 Form



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2010, 05:34 PM posted to microsoft.public.access
Bardia
external usenet poster
 
Posts: 37
Default Access 2003 Form

Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check, Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property of
Check Number Control that if user chose the Check in Payment Type combo box
to be forced to enter a check number into Check Number control before record
could be saved?

--
Bardia
  #2  
Old May 25th, 2010, 08:01 PM posted to microsoft.public.access
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Access 2003 Form

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[Payment Type] = "Cash" Then
If Len(Me.[Check_Number ]& vbNullString) = 0 Then
MsgBox "You must enter a check number", vbOKOnly
Me.[Check Number].SetFocus
Cancel = True
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia



  #3  
Old May 26th, 2010, 02:42 AM posted to microsoft.public.access
a a r o n . k e m p f @ g m a i l . c o m
external usenet poster
 
Posts: 1,108
Default Access 2003 Form

I don't think that it's practical to store payment information in an
Access (Jet) database.

It's just not possible to secure a jet database

Move to SQL Server if you want to keep your data secure. I really
reccomend Access Data Projects, they allow you to use Access forms and
reports.. and additionally seamlessly use Stored Procedures, Views,
Functions, Triggers, etc






On May 25, 9:34*am, Bardia wrote:
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check, Credit
Card
2- Check Number (text box)
*Question:
What procedure or code I have to apply and to which event in property of
Check Number Control that if user chose the Check in Payment Type combo box
to be forced to enter a check number into Check Number control before record
could be saved?

--
Bardia


  #4  
Old May 26th, 2010, 05:18 AM posted to microsoft.public.access
Larry Linson
external usenet poster
 
Posts: 3,112
Default Access 2003 Form

Mr. Kempf, in view of the impending demise on 6/1/2010, I suggest you copy
the message you posted here, use it to create a web page, and make it
available to all as "'All you need to know about Access' by Aaron Kempf".
As your advice is invariably the same, you wouldn't need to invest in
anything more than a "starter" website package.

Doesn't it bother you to be recommending something (ADP) that is no longer
recommended by the Access team, and a strong candidate for deprecation in
the near future? Or, do you enjoy luring unknowledgeable new users down a
dead-end path, just for the fun of it?

--
Larry Linson, Microsoft Office Access MVP
Co-author: "Microsoft Access Small Business Solutions", published by Wiley
Access newsgroup support is alive and well in USENET
comp.databases.ms-access


"a a r o n . k e m p f @ g m a i l . c o m" wrote in
message
...
I don't think that it's practical to store payment information in an
Access (Jet) database.

It's just not possible to secure a jet database

Move to SQL Server if you want to keep your data secure. I really
reccomend Access Data Projects, they allow you to use Access forms and
reports.. and additionally seamlessly use Stored Procedures, Views,
Functions, Triggers, etc






On May 25, 9:34 am, Bardia wrote:
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia



  #5  
Old May 28th, 2010, 08:30 PM posted to microsoft.public.access
Bardia
external usenet poster
 
Posts: 37
Default Access 2003 Form

Thank you, now the problem is since Check Number control is format as Number
field when I open the form zero (0) is already in that field and your
procedure accepts that as check number and let me go to next new record and
exit. Please advice.
--
Bardia


"Arvin Meyer [MVP]" wrote:

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[Payment Type] = "Cash" Then
If Len(Me.[Check_Number ]& vbNullString) = 0 Then
MsgBox "You must enter a check number", vbOKOnly
Me.[Check Number].SetFocus
Cancel = True
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia



.

  #6  
Old May 29th, 2010, 03:50 AM posted to microsoft.public.access
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Access 2003 Form

Actually it checks the length of the value. So change that line of code to:

If Me.[Check_Number] = 0 Then
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Thank you, now the problem is since Check Number control is format as
Number
field when I open the form zero (0) is already in that field and your
procedure accepts that as check number and let me go to next new record
and
exit. Please advice.
--
Bardia


"Arvin Meyer [MVP]" wrote:

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[Payment Type] = "Cash" Then
If Len(Me.[Check_Number ]& vbNullString) = 0 Then
MsgBox "You must enter a check number", vbOKOnly
Me.[Check Number].SetFocus
Cancel = True
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property
of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia



.



  #7  
Old May 30th, 2010, 09:05 PM posted to microsoft.public.access
Bardia
external usenet poster
 
Posts: 37
Default Access 2003 Form

Thanks again, I replaced the line " If Len(Me.[Check_Number ]& vbNullString)
= 0 Then", with "If Me.[Check_Number] = 0 Then" as instructed but I have the
same problem. If I leave the zero(0) in the field it let me go to next
record, If I delete the zero then stops me and message emerge
--
Bardia


"Arvin Meyer [MVP]" wrote:

Actually it checks the length of the value. So change that line of code to:

If Me.[Check_Number] = 0 Then
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Thank you, now the problem is since Check Number control is format as
Number
field when I open the form zero (0) is already in that field and your
procedure accepts that as check number and let me go to next new record
and
exit. Please advice.
--
Bardia


"Arvin Meyer [MVP]" wrote:

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[Payment Type] = "Cash" Then
If Len(Me.[Check_Number ]& vbNullString) = 0 Then
MsgBox "You must enter a check number", vbOKOnly
Me.[Check Number].SetFocus
Cancel = True
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property
of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia


.



.

  #8  
Old June 2nd, 2010, 10:50 PM posted to microsoft.public.access
Bardia
external usenet poster
 
Posts: 37
Default Access 2003 Form

Thank you problem is solved.
--
Bardia


"Arvin Meyer [MVP]" wrote:

Actually it checks the length of the value. So change that line of code to:

If Me.[Check_Number] = 0 Then
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Thank you, now the problem is since Check Number control is format as
Number
field when I open the form zero (0) is already in that field and your
procedure accepts that as check number and let me go to next new record
and
exit. Please advice.
--
Bardia


"Arvin Meyer [MVP]" wrote:

Sub Form_BeforeUpdate(Cancel As Integer)
If Me.[Payment Type] = "Cash" Then
If Len(Me.[Check_Number ]& vbNullString) = 0 Then
MsgBox "You must enter a check number", vbOKOnly
Me.[Check Number].SetFocus
Cancel = True
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"Bardia" wrote in message
...
Access 2003 form with several controls including following:
1- Payment Type (combo box) that contain three entrees: CASH, Check,
Credit
Card
2- Check Number (text box)
Question:
What procedure or code I have to apply and to which event in property
of
Check Number Control that if user chose the Check in Payment Type combo
box
to be forced to enter a check number into Check Number control before
record
could be saved?

--
Bardia


.



.

 




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 10:38 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.