473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Auto Assign Variable text based on parameters

83
I have a button that when pressed on a form, automatically reads statments and inputs a text sentence, based on other fields on the form. However, the variable only gets assigned a sentence if something is true, but null if it is not true. The below code sits after all of the criteria statements. The problem is that when the first four statements are null, the field has four spaces before the sentence. This is obvious because of the " " after ever variable. Is there an automatic function that only read a space if the previous variable is not null, or do I have to make an isnull statement for every " ".

Expand|Select|Wrap|Line Numbers
  1. Me.Pending_Reasons = NoLE & " " & updttfs & " " & updtavs & " " & Illno & " " & updtfas & " " & updtmidl & " " & updtisc & " " & SurNoLE & " " & surupdtfs & " " & surupdtmidl & " " & surupdtemsi & " " & surupdtavs & " " & surupdtfas & " " & surupdtisc
May 15 '07 #1
4 2001
MMcCarthy
14,534 Expert Mod 8TB
You have posted this question in the articles section.

I am moving it to the Access forum.

ADMIN
May 15 '07 #2
NeoPa
32,556 Expert Mod 16PB
I think you'll find that the IsNull() is required repeatedly :(
You could write your own VBA function to handle it though.
May 15 '07 #3
NeoPa
32,556 Expert Mod 16PB
Please visit this thread to see why we would rather you didn't double-post (Please do Not Double Post ).

MODERATOR.

In this case you've wasted the time of a number of experts and also caused a mess that needs to be cleared away.
May 15 '07 #4
NeoPa
32,556 Expert Mod 16PB
In the OTHER thread (Handling Nulls in a String), you will find a better answer than mine. Mine was wrong so please ignore it.
May 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
4
by: Julie J. | last post by:
When working w/ forms and controls, in 95% of the cases, the value of the control is used somewhere in the program (duh!). However, there doesn't seem to be an easy way to attach a value variable...
3
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
6
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text =...
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
7
by: bryant | last post by:
Hi all. I am new to ASP and working in Expression Web. The following query displays the information I need in the gridview for a single record. SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
2
by: Ronald | last post by:
I hope somebody can help. I can't get into the specifics of my project, but I'll try to create a simple example: tblVehicle * VIN (text box) * Make (text box) * Model (text box) frmRepair
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.