| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
#1
| |||
| |||
| For some reason, this simple thing is getting me. I have a form that a user will type an account # in a text box in then click a button to open a new form. It is an unbound text box with no calculations on it or anything. If it is empty/blank/null, then I want a message box to pop up telling them they need to type something in that text box before proceeding. I have tried is Null: only to get Access Error "Object Required." Private Sub cmdAddMissingCPrequest_Click() If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then MsgBox "Please enter an account # to proceed." Else DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" DoCmd.Maximize End If End Sub Also, tried ="" : and it goes on to the form when I want it to pop up a message! Private Sub cmdAddMissingCPrequest_Click() If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then MsgBox "Please enter an account # to proceed." Else DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" DoCmd.Maximize End If End Sub Oracle |
|
#2
| |||
| |||
| Try IsNull(Forms![frmBiller-MissingChargesinCP]!txtAccount) PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com "worksfire1" <worksfire1@discussions.microsoft.com> wrote in message news 8F321B3-24C8-4DFB-8B18-8D37A368B450@microsoft.com...> For some reason, this simple thing is getting me. I have a form that a > user > will type an account # in a text box in then click a button to open a new > form. It is an unbound text box with no calculations on it or anything. > If > it is empty/blank/null, then I want a message box to pop up telling them > they > need to type something in that text box before proceeding. > > I have tried is Null: only to get Access Error "Object Required." > Private Sub cmdAddMissingCPrequest_Click() > If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then > MsgBox "Please enter an account # to proceed." > Else > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > DoCmd.Maximize > End If > End Sub > > Also, tried ="" : and it goes on to the form when I want it to pop up a > message! > Private Sub cmdAddMissingCPrequest_Click() > If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then > MsgBox "Please enter an account # to proceed." > Else > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > DoCmd.Maximize > End If > End Sub |
|
#3
| |||
| |||
| Hi worksfire, If isnull(Forms![frmBiller-MissingChargesinCP]!txtAccount) or Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then msgbox "blah blah blah" etc. etc in this way you check both cases (null or blank) with just an if HTH Paolo "worksfire1" wrote: > For some reason, this simple thing is getting me. I have a form that a user > will type an account # in a text box in then click a button to open a new > form. It is an unbound text box with no calculations on it or anything. If > it is empty/blank/null, then I want a message box to pop up telling them they > need to type something in that text box before proceeding. > > I have tried is Null: only to get Access Error "Object Required." > Private Sub cmdAddMissingCPrequest_Click() > If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then > MsgBox "Please enter an account # to proceed." > Else > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > DoCmd.Maximize > End If > End Sub > > Also, tried ="" : and it goes on to the form when I want it to pop up a > message! > Private Sub cmdAddMissingCPrequest_Click() > If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then > MsgBox "Please enter an account # to proceed." > Else > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > DoCmd.Maximize > End If > End Sub |
|
#4
| |||
| |||
| Thank you!!!! Just curious, why did it not work the way I had written the IF .... is null statement? "Steve" wrote: > Try IsNull(Forms![frmBiller-MissingChargesinCP]!txtAccount) > > PC Datasheet > Providing Customers A Resource For Help With Access, Excel And Word > Applications > resource@pcdatasheet.com > > > > > "worksfire1" <worksfire1@discussions.microsoft.com> wrote in message > news 8F321B3-24C8-4DFB-8B18-8D37A368B450@microsoft.com...> > For some reason, this simple thing is getting me. I have a form that a > > user > > will type an account # in a text box in then click a button to open a new > > form. It is an unbound text box with no calculations on it or anything. > > If > > it is empty/blank/null, then I want a message box to pop up telling them > > they > > need to type something in that text box before proceeding. > > > > I have tried is Null: only to get Access Error "Object Required." > > Private Sub cmdAddMissingCPrequest_Click() > > If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then > > MsgBox "Please enter an account # to proceed." > > Else > > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > > DoCmd.Maximize > > End If > > End Sub > > > > Also, tried ="" : and it goes on to the form when I want it to pop up a > > message! > > Private Sub cmdAddMissingCPrequest_Click() > > If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then > > MsgBox "Please enter an account # to proceed." > > Else > > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > > DoCmd.Maximize > > End If > > End Sub > > > |
|
#5
| |||
| |||
| Thank you!!! That works. "Paolo" wrote: > Hi worksfire, > > If isnull(Forms![frmBiller-MissingChargesinCP]!txtAccount) or > Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then > msgbox "blah blah blah" etc. etc > > in this way you check both cases (null or blank) with just an if > > HTH Paolo > > "worksfire1" wrote: > > > For some reason, this simple thing is getting me. I have a form that a user > > will type an account # in a text box in then click a button to open a new > > form. It is an unbound text box with no calculations on it or anything. If > > it is empty/blank/null, then I want a message box to pop up telling them they > > need to type something in that text box before proceeding. > > > > I have tried is Null: only to get Access Error "Object Required." > > Private Sub cmdAddMissingCPrequest_Click() > > If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then > > MsgBox "Please enter an account # to proceed." > > Else > > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > > DoCmd.Maximize > > End If > > End Sub > > > > Also, tried ="" : and it goes on to the form when I want it to pop up a > > message! > > Private Sub cmdAddMissingCPrequest_Click() > > If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then > > MsgBox "Please enter an account # to proceed." > > Else > > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" > > DoCmd.Maximize > > End If > > End Sub |
|
#6
| |||
| |||
| "Steve" <sorry@private.emailaddress> schreef in bericht news:13d8cr8kmd9d8e6@corp.supernews.com... > Try IsNull(Forms![frmBiller-MissingChargesinCP]!txtAccount) > > PC Datasheet -- Get lost Steve!! We don't need you here !!, but.... ==>Let's ask it the 'nice' way... Would you please, please go away Steve ?? This is to inform 'newbees' here about PCD' Steve: http://home.tiscali.nl/arracom/whoissteve.html (updated, mainly the 'abuse-reporting' page...) Until now 3800+ pageloads, 2400+ first-time visitors (these figures are real and rapidly increasing) Why is this ??? Because Steve is the ONLY person here who continues to advertise in the groups. It is not relevant whether he advertised in *this* particular post or not... ==> We want him to know that these groups are *not* his private hunting grounds! For those who don't like too see all these messages: ==> Simply killfile 'StopThisAdvertising'. Newbees will still see this warning-message. ArnoR |
|
#7
| |||
| |||
| Is Null amd Is Not null are expressions that can only be used in the criteria of fields in a query. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com "worksfire1" <worksfire1@discussions.microsoft.com> wrote in message news:2E63E225-1A21-45E9-9807-7BBB8D7AC6FC@microsoft.com... > Thank you!!!! > > Just curious, why did it not work the way I had written the IF .... is > null > statement? > > "Steve" wrote: > >> Try IsNull(Forms![frmBiller-MissingChargesinCP]!txtAccount) >> >> PC Datasheet >> Providing Customers A Resource For Help With Access, Excel And Word >> Applications >> resource@pcdatasheet.com >> >> >> >> >> "worksfire1" <worksfire1@discussions.microsoft.com> wrote in message >> news 8F321B3-24C8-4DFB-8B18-8D37A368B450@microsoft.com...>> > For some reason, this simple thing is getting me. I have a form that a >> > user >> > will type an account # in a text box in then click a button to open a >> > new >> > form. It is an unbound text box with no calculations on it or >> > anything. >> > If >> > it is empty/blank/null, then I want a message box to pop up telling >> > them >> > they >> > need to type something in that text box before proceeding. >> > >> > I have tried is Null: only to get Access Error "Object Required." >> > Private Sub cmdAddMissingCPrequest_Click() >> > If Forms![frmBiller-MissingChargesinCP]!txtAccount Is Null Then >> > MsgBox "Please enter an account # to proceed." >> > Else >> > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" >> > DoCmd.Maximize >> > End If >> > End Sub >> > >> > Also, tried ="" : and it goes on to the form when I want it to pop up a >> > message! >> > Private Sub cmdAddMissingCPrequest_Click() >> > If Forms![frmBiller-MissingChargesinCP]!txtAccount = "" Then >> > MsgBox "Please enter an account # to proceed." >> > Else >> > DoCmd.OpenForm "frmBiller-ROEsAndOracle#sList" >> > DoCmd.Maximize >> > End If >> > End Sub >> >> >> |
![]() |
| Thread Tools | |
| Display Modes | |
| ||||
| Posted By | For | Type | Date | |
| javascript message box | This thread | Refback | 09-28-2007 12:03 AM | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.