473,388 Members | 1,526 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,388 software developers and data experts.

remove space in table

i want to remove space in my table. it is a text box and i want to remove the space after the character. the field is integer
thanks aot
Jun 8 '07 #1
8 2992
maxamis4
295 Expert 100+
My friend, the answer to your question is the replace function:

Expand|Select|Wrap|Line Numbers
  1. dim yourvariable as integer
  2.  
  3. yourvariable = replace(yourvariable, " ","")
  4.  
  5.  
http://www.csidata.com/custserv/onli...ocs/vbs172.htm here is a link that explains it way better than I do
Jun 8 '07 #2
thanks. but i have some problem. the problem is that this table is in sql. i mea it is linked to a table in sql and the table is not there, so how can i define my varibles.
i have some more problem too. if i want to do error handling for my check boxes how can i write them. i want to say that at least one of the check boxes should selected.

thanks
Jun 8 '07 #3
maxamis4
295 Expert 100+
thanks. but i have some problem. the problem is that this table is in sql. i mea it is linked to a table in sql and the table is not there, so how can i define my varibles.
i have some more problem too. if i want to do error handling for my check boxes how can i write them. i want to say that at least one of the check boxes should selected.

thanks

Okay I see you have quite a few questions. lets start with the first one:

i mea it is linked to a table in sql and the table is not there, so how can i define my varibles
I need you to explain this a little bit more for me
Jun 8 '07 #4
Thank you so much
really i need ur help. thanks alot
i try to explain good.

i have a form that consists of different tab.
step 1 and 3 are same for all the selected items but step 2 is different to what the user is going to select.
hopefully there is no probloem up to here and with lots of torture i did them. i can pass all the information that user is going to choose to the table in sql.
but i have some problems.
the first problem is that in first step i have a text box that the user should enter a number manually. so when it goes and sit in a table in sql there is a space after the number that i have to remove it with trim, but how, i do not know.
i am sending this now and i am going to send my other problem also , but i was thinking me e u be on now and u can help me. i will send one more here again.
thanks
Jun 8 '07 #5
my other problem is that in step 2 i have a check box that the user should choose one of them othere wise an error message should comes up. but i dont know how can i put them in error handling
ex:
If IsNull(Me.camp) = True Then
' txtErrCode = 1
ElseIf IsNull(Me.chk_ri) = True Then
'txtErrCode = 1
' If IsNull(Me.chk_ri1) = True Then
' txtErrCode = 1
' ElseIf IsNull(Me.cjk_ri2 = True Then
' txtErrCode = 1
' ElseIf IsNull(Me.chk_ri3 = True Then
' txtErrCode = 1
Else
' txtErrCode = 0

i know i am wrong.

and the thirs problem is that i want after user pres the finish button at the end, again it comes to the first tab.

it is too much.
but problem finished
Jun 8 '07 #6
maxamis4
295 Expert 100+
for your first question I would use the after update function in your control to force the text box to trim. So whenever a user changes the value it will initiate the trim command.

As far as the error part goes use the on error validator in access. The best way to see this work is use the wizard to create a command button and it will design the template for you. You can see on error handling working there.

good luck
Jun 9 '07 #7
rhanks alot, i hope it works. I have to test it tomorrow at work.
Jun 11 '07 #8
NeoPa
32,556 Expert Mod 16PB
This thread is one of a pair that were double-posted. Anyone interested in viewing the other will find it here (remove space).
It has been closed to avoid further confusion.
Jun 12 '07 #9

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

Similar topics

0
by: Sugapablo | last post by:
I'm having trouble formatting a table properly in MSIE. What I have works in Mozilla and just won't work in MSIE. This is the code: http://www.sugapablo.net/temp/html.txt Here is an image...
7
by: wk | last post by:
Hi, I have a seemingly simple html code which has two tables one under another, and both have an image of same size...but the table row also has some text, which seems to be creating a small gap...
4
by: Beffmans | last post by:
Hi I want to remove the space under the <hr>.. How to to this? <TABLE cellSpacing="0" cellPadding="2" border="0" width="100%"> <TR> <TD colSpan="2" style="HEIGHT: 7px"> <hr width="100%">...
2
by: Beffmans | last post by:
Hi How do i remove the space below the 'hello'? <TABLE> <tbody> <tr> <td> <asp:panel id="pnlTop" Runat="server"> <TABLE>
11
by: Richard Maher | last post by:
Hi, I have read many of the copius entries on the subject of IE performance (or the lack thereof) when populating Select Lists. I don't mind the insert performance so much, (I get 100x120byte...
10
by: Phil Stanton | last post by:
I have a table of SpaceAreas eg Food Store, Garden Shed etc with the first and last bin for each Space Area defined. eg Food Store First Space 1, last space 26 and Gargen Shed First space 1, last...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
2
by: progvar | last post by:
Hi i have not any idea how to remove white space in vb actualy i am accessing value from table some time the column is null and some time it contain space means user press space bar to remove data...
5
by: danield | last post by:
Hello All, I have a query that I use to create another table: SELECT column1 & " " & column2 INTO table2 FROM table1 The problem is that sometimes there is no value in column1 and then...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.