From: Bardia on 25 May 2010 12:34 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
From: Arvin Meyer [MVP] on 25 May 2010 15:01 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" <Bardia(a)discussions.microsoft.com> wrote in message news:9551E437-C820-453D-B97D-77D4240C7B07(a)microsoft.com... > 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
From: a a r o n . k e m p f on 25 May 2010 21:42 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 <Bar...(a)discussions.microsoft.com> 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
From: Larry Linson on 26 May 2010 00:18 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" <aaron.kempf(a)gmail.com> wrote in message news:02407083-d620-441d-8a5d-1c2f41a22878(a)k17g2000pro.googlegroups.com... 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 <Bar...(a)discussions.microsoft.com> 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
From: Bardia on 28 May 2010 15:30
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" <Bardia(a)discussions.microsoft.com> wrote in message > news:9551E437-C820-453D-B97D-77D4240C7B07(a)microsoft.com... > > 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 > > > . > |