Solved

What is the value of a blank textbox control?

Posted on 2012-03-27
3
299 Views
Last Modified: 2012-06-27
I have a formw ith two subforms.  On the main form, to be used in calculations, is a text box that uses the sum from the variable subform and another textbox that uses the sum from teh constant subform.  HOwever, not both subforms will have totals.  So, how the (&^*^*(&() do I tell the code to check both and if they are not null (or empty) then do something else?  I have tried testing for nulls, 0, etc, and nothing seems to work.  

If Me.txtVar <> "" And Me.txtCon <> "" Then   Also tried
If (Me.txtVar) > 0 And (Me.txtCon) > 0 Then    Also tried
If Not IsNull(Me.txtVar and Not isNull Me.txtCOn

But when the code runs, I get an error or it runs that if statement, but I want to check to see if either one of the fields is empty.  This is on an ACCESS 2003 form/subforms

Sandra
0
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 37773836
Its either empty or null.

Try this :

If me.txtbox & "" <> "" THEN
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 37773847
For either :

If me.txt1 & "" = "" or me.txt2 & "" ="" then....
0
 

Author Closing Comment

by:ssmith94015
ID: 37773855
Thank you, I was thinking I would have to scrap an entire day's worth of work over this things!

Sandra
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question