473,769 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remove space in table

92 New Member
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 3022
maxamis4
295 Recognized Expert Contributor
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
voroojak
92 New Member
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 Recognized Expert Contributor
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
voroojak
92 New Member
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
voroojak
92 New Member
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_r i) = True Then
'txtErrCode = 1
' If IsNull(Me.chk_r i1) = True Then
' txtErrCode = 1
' ElseIf IsNull(Me.cjk_r i2 = True Then
' txtErrCode = 1
' ElseIf IsNull(Me.chk_r i3 = 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 Recognized Expert Contributor
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
voroojak
92 New Member
rhanks alot, i hope it works. I have to test it tomorrow at work.
Jun 11 '07 #8
NeoPa
32,573 Recognized Expert Moderator MVP
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
3191
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 of what's happening: http://www.sugapablo.net/temp/table.png
7
27284
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 between the two images on display. Can anybody tell me how to remove the thin gap between the two images? <table cellpadding="0" cellspacing="0" border="0"> <tr>
4
1849
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%"> </TD> </TR>
2
1582
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
4511
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 rows inserted/sec up to 500, and 100rows/6secs up to 3000, which isn't great but then the Row Count is clicking away for the user to see and they can hit the "cancel" button at anytime, so overall I'm happy), what really disappoints me is the...
10
2092
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 Space 50. SpaceAreas Table is SpaceAreaID Auto SpaceAreaDesc Text FirstSpace Integer LastSpace Integer I have a secont table of the Equipment Stored in each space
6
7997
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, call determined functions, and edit the data already present What will you need to use the grid? A table with standard markup and an ID to call the script that will turn the table into a grid Parameters: tabelaID => id of the table that will...
2
3872
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 from that field when i access value null field executes but the field which contain white space please give some idea how i can remove executes data in both conditions or how i will remove white space thanks veer
5
3270
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 the new entry in table2 is 'space' and then column2. For example if first column has '1' and second column has '2', the new record in the table2 would be '1 2' but if another row has nothing in the column 1 and then '3' in the column2, resulting row...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.