Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Logging Data To A TextBox?


I am using this code as below:


Option Explicit

Private Sub Save_File()
Dim con As Control
For Each con In Controls

Text1.Text = Text1.Text & "Name: " & con.Name & vbCrLf
Text1.Text = Text1.Text & "Top: " & con.Top & vbCrLf
Text1.Text = Text1.Text & "Left: " & con.Left & vbCrLf & vbCrLf
Next
End Sub

Then I also wish to save, which Bitmap is displayed in the control, which will be logged to that TextBox. But all of the controls that will be logged, will be Visible = True controls only.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Still More Trouble With Logging Data To TextBox!!
I still have problems with the code that I have been given. The code now gets a message from the computer and it says.

It's a compile error and it is a variable not defined. The error is in all variables that are called upon this: "ct1".

My code looks like this...


Dim ctl As Control

For Each ctl In Me.Controls
If ctl.Visible = True Then Text1.Text = ct1.Name
If ct1.Visible = True Then Text1.Text = ct1.Top
If ct1.Visible = True Then Text1.Text = ct1.Left
If ct1.Visible = True Then Text1.Text = ct1.Picture
If ct1.Visible = True Then Text1.Text = ct1.ToolTipText
Next

Logging And Scanning A Textbox.
I'm working on a program that’s going to be a server manager for a game and I've kind of hit a road block. Problem is I am very new to VB and this level of programming in general so I don't know enough about VB to get past it.
One thing I should note is that I'm using an ActiveX .dll that gives me access to macro functions. It’s called AutoItX by http://www.autoitscript.com/autoit3/


With one aspect of the application I need to interact with a textbox. I need to log all the text in the the programs 80 line "console", as well as scan it for specific text, (i.e. user commands).

As far as the log goes, an easy solution would be to copy all the text, append it to a .txt file then clear the console so that I don't duplicate the text. But I'd rather not do that since the people using this app will want to see what’s in the console without having to open the text log.
I had an idea to "EditPaste" (which is an AutoItX function) a marker into the textbox to indicate where the last copy ended but I'm not 100% sure about that method.
Also I want store it in a .txt file because the Dedicated Server software that I am interfacing with already uses text files to store most of its data. The format it uses is:Code:[Section Name]
Setting1 = Value1
Setting2 = Value2so since I will also have to interact with them for other features of my Server Manager, I figure I may as well store most of my data that way so that I don't have to code numerous data storage/interaction methods.

For the command scanning portion I need it to be fast and reliable. The Server Manager may be doing multiple tasks at one time, and since it's a game server I need to make the whole app as unobtrusive (performance wise) as possible. The commands will (initially) be submitted thru the games chat function. All chat, public and private is displayed in the console. Later I want to create a little app that lets the server moderators execute commands remotely.
I don't know enough about AutoIt or VB to design the command scanning function, but I imagine it could be done by creating a way of tracking each line entered into the textbox, then numbering them so that it could scan new lines with string functions to detect commands.
An example of the things the scan function will do is initiate a vote kick, so it will need to monitor player names, and their vote. Another example is an anti spam monitor, if a player posts the same message numerous times it would warn or kick them.


There's a whole big list in a FreeMind map of the features I want to add, but for now I want to start with these since they (I think) will be the hardest part and other features rely on them.

Any help that anyone could give would be greatly appreciated.

Logging And Editing Multiple Characters In A Textbox
hey, i have a problem
i am trying to make a secret message coding/decoding prog
however i am having probs about reading multiple characters and changing them into the code or decoding a message
if anyone can point me in the right direction i would be thankful

Data Logging - Serial Port Data
Hi all

I have got a simple program which reads information from a serial device using a send and responce method.

The information received from the port i have got displayed in a text box on the form.

the format of the text is +0.000<cr>

what i want to do is to automatically log this information on a single excel file.
i.e.
0.000
0.000
0.123
0.012

any help would be great!!!!

Data Logging
I am writing a program to measure wind speed and temperature through a Velleman USB interface board and i need to log the data at least everysecond. Once the data is stored I am intending on retrieving the data via excel in order to plot a graph. I require help on the code for logging the data and storing it in a text file or excel spreadsheet. Could you please point me in the right direction? I am an absolute beginner


Code:
Option Explicit
Dim DoNothing As Boolean
Dim milliseconds As Integer
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (Data1 As Long, Data2 As Long)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long, ByVal data As Long)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal Data1 As Long, ByVal Data2 As Long)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal data As Long)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long) As Boolean
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Long
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Long) As Long
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Long)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Long, ByVal DebounceTime As Long)
Dim maxtemp As Double
Dim mintemp As Double
Dim minpres As Double
Dim maxpres As Double
Dim px As Single
Dim py As Single
Dim py1 As Single
Dim px1 As Single
Dim x As Single
Dim y As Single
Dim x1 As Single
Dim y1 As Single
Dim m As Long
Dim file As Long

Private Sub ClearAllAnalog1_Click()
ClearAllAnalog
VScroll1.Value = 0

End Sub

Private Sub Connect_Click()
Dim CardAddress As Long
Dim h As Long
CardAddress = 0
h = OpenDevice(CardAddress)
Select Case h
Case 0, 1, 2, 3
Status.Caption = "Reading"
Case -1
Status.Caption = "Instrument not found"
End Select
If h >= 0 Then Timer1.Enabled = True

End Sub



Private Sub Stop_Click()
Dim CardAddress As Long
Dim h As Long
CardAddress = 0
h = OpenDevice(CardAddress)
Select Case h
Case 0, 1, 2, 3
Status.Caption = "Stopped"
Case -1
Status.Caption = "Instrument not found"
End Select
If h >= 0 Then Timer1.Enabled = False
End Sub


Private Sub Form_Terminate()
CloseDevice
End Sub

Private Sub SetAllAnalog1_Click()
SetAllAnalog
VScroll1.Value = 255
End Sub

Private Sub Timer1_Timer()
Timer1.Enabled = False
Dim Data1 As Long
Dim Data2 As Long
ReadAllAnalog Data1, Data2
Label7.Caption = Data1 & "m/s" 'displays numberical value of Data1
Label9.Caption = Data2 & "C" 'displays numberical value of Data2
Timer1.Enabled = True
Dim temp As Long
Dim data As Long
data = Data1

End Sub
Private Sub Printdata(ByRef data As Long)
file = "c:adam emplogairflow.txt" 'text file for saving data
Open file For Append As #1

Print Data1

Close #1


End Sub
Private Sub VScroll1_Scroll()
OutputAnalogChannel 1, VScroll1.Value 'control for wind tunnel motor
End Sub

Private Sub graph_Click()
Form5.Show 'picture box graph form
End Sub

Data Logging
I have a text box that is regularly update by a timer.This box can change as often as half a second intervals. What would be the most efficient way to log the data as it updates.I would like to view it after say 40 changes and print it. When I click print i would also like to clear the log to start again.
I am looking for something efficient. I could possibly use an access database but that is to chunky.

Logging Comm Data
My app utilizes a MSComm control to perform half-duplex communications with a lab instrument. Many different packet structures are used but the data streams are 57600,N,8,1 ASCII. I need to log both sent and received data in a session to a file. The send-receive operations are working nicely.

I have very limited experience with GETs and PUTs and no VB experience with Binary files. My Send code sources Byte arrays of ASCII characters and my receive data is processed as comEvReceive interrupts.

Can some one suggest to me the syntax for Opening the Binary log file and for the Send and Recv Put's? I want a single byte in the file for each sent or received character. Each packet starts with a null character and ends with a 0x0D character.

Compact Logging Data
Hello All

I have an application that logs pressure data for later graphing and manipulating. All this is working fine but i have one question.

At present i have the logged data writing to a text file, which when logging 8 channels upto 10,000 times a second the log file gets quite large if you log for a while.

Is there another file type you would suggest for easy writing and reading but reducing the file size and therefore reading/writing time? as at the high speeds a 200 MB file is not unheard of.

Thanks for any thoughts.

Hojo

Winsock Data Sent Logging
Heya,

I'm just wondering if it's possible to record all data SENT through a winsock control...

Without making a specific bit of code for every sub that sends data..

any ideas?

Thanks

Data Logging The User's Actions.
Hi I am trying to log every action the user performs while completing the given task. and write them to the text file. I have comboboxes, option buttons, text boxes and command button and I want to log every time user changes the input to those even all those actions before clicking the button.

For the command button I manage to log on click event
For the textboxes I manage to log on lost focus event and they all work and get written into the text file.

I was wondering on what specific events does the option buttons and comboboxes get logged?

Oh And another question is I have some messages come up in the form if there is any missing input that was supposed to be completed? How can I also log the occurence of those messages?

Many Thanks

More Questions On Logging Comm Data
DougT was able to help me out on Get and Put to binary files. But I am still having trouble parsing my incoming data streams.

I am using MSComm controls to send to (the host) and receive from (the client) an instrument simulator; using two programs I am creating with VB6. When this is working I will ship the host software to a distant location where a collaborator will connect with the real hostpital laboratory instrument and log my dialog attempts.

Communications is half-duplex using packets that start with a nul (0x00) and end with a VBcr (0x0d); neither of which characters are prohibited in certain other packet positions. The length of the packets is determined by a lookup table based upon the second, and possibly another, byte in the packet (depending upon the value of the second byte). There is no handshaking involved. I need to log the communications dialog to a screen text box and to a binary file to debug the host VB code. The client protocol is reasonably well defined by the manufacturer.

My problem is in using the MScomm control features to parse the reply packets. I believe I need to parse the replies one byte at a time in order to be able to determine packet length. For this I believe I need to set the Receive Threshold at 1, the InputMode to comInputModeText and InputLen to 1 while processing every comEvReceive interrupt event. Because each packet character can have a multitude of interpretations I plan to just log the hex value stream for now.

At this point I am all tangled up in ASC vs CHR vs byte number vs arrays vs ubounds vs redims vs strings and what seems like a million permutations, none of which seem to work right! Please help me with the MSComm settings to get one interrupt (comEvReceive) per character, one character per interrupt, and how to recover at least the decimal value of each incoming character. I must not lose the character position regardless of the character value (including 0x00) so that I will know where I am in a packet at all times.

I have really given up on trying to manage dynamic byte arrays!

I really don't understand why this is so difficult!!!!

My current resources are "Using the (MsComm) Communications Control" and Xtreme Visual Basic Talk > Legacy VB > Knowledge Base > Tutor's Corner > File IO.

Keystroke Count(not Data Logging)
I am working with a medical transcription company which uses several hundred different templates which the typists modify according to the audio they are working on, therefore i cannot use the starting and finishing character count to establish what the typist has actually done, they also use typesmart which means that the overall total bears little relation to the keystrokes entered. So i am hoping that some one out there can help me.
What i need is a method of counting keystrokes while each document is open.
(only the amount, NOT datalogging)
I do realise that this is very close to the edge of what is or is not malicious,
however I did consult with a moderator befor submitting this post.
any suggestions gratefully recieved
peadar

Logging Command Propmt Data Into VB
Is there a way to log data into a VB application? Well for Visual studio 2008 (cant find section for Visual Basic 2008) but is there a way to log it into a un editable textbox what the program is. Is that its a java program that runs on windows its a server and it constintly logs data into a Command Prompt window is there a way to get that data and have it log into a Visual Basic App?

Logging Data And Drawing Graphs
Hi!
My program involves data acquisition. i have divided it in two parts i.e. vb as the front end and c as the back end. i have made exe of the c program which i run in my vb program using SHELL command. the c program acquires the data and writes it in a file (say data.txt). the format in which it(c program) writes can be altered to suite the vb program. the length of the data is variable(i.e for each run it varies depending on the user's choice but during the run we know the length and it is stored in a variable called numofdata).
in my vb project my task is to read from the file (data.txt) and store it in a excel sheet or any other table so that the format appears as below

TIME QUANTITY 1 QUANTITY 2 QUANTITY 3 QUANTITY (1+2+3 )
0 10 20 50 30
1 88 22 44 15
and so on
this is one sheet and similary another sheet with QUANTITY 4, OUANTITY 5 AND QUANTITY 6 in other table. then i have to plot graph of time on x axis and QUANTITY 1, QUANTITY 2, QUANTITY 3, QUANTITY (1+2+3 ) on y axis as one graph and time on x axis and QUANTITY 4, OUANTITY 5 AND QUANTITY 6 as another graph. (all the values of time quantity1,2,3,(1+2+3),4,5,6 are available in the file i.e. Data.txt). how can i go about? please advice.
Thank you.
ADDYOT.

Logging And Graphing Data From Serial Port
Hello All,
I an totally new to VB and really have no VB programming experience. I hope that you guys are patient with me.
OK here is what I am doing. I have a temperature data logger that connects to the serial port of my computer. here is a link to the hardware http://quozl.netrek.org/ts/
The logger comes with a program that logs the values in a .log file usually named something like 2005034.log, 2005035.log as so on. The file number cahnges every day automatically as long as the c code is running. The contents of the log file look like this

2005,040,00,00,30,68.00,68.32,,
2005,040,00,01,00,68.00,68.32,,
2005,040,00,01,30,68.00,68.32,,
2005,040,00,02,00,68.00,68.32,,
2005,040,00,02,30,68.00,68.32,,
2005,040,00,03,00,68.00,68.45,,
2005,040,00,03,30,68.00,68.45,,
2005,040,00,04,00,68.10,68.45,,
2005,040,00,04,30,68.10,68.45,,
2005,040,00,05,00,68.10,68.45,,
2005,040,00,05,30,68.10,68.45,,
2005,040,00,06,00,68.10,68.45,,
2005,040,00,06,30,68.00,68.45,,

and so on... the values are year, XXX,hour,minute,first sensor tempin F, second sensor temp in F,,
where XXX is valus I dont care about.
Can anyone help me with writing a program that reads the serial port data, logs it and plots a graph for a given time perid ( days or hours) and displays tha graph on a website along with the current parameters??? Would it be easier to keep the C program running and just graphing and displaying the content on a website using VB?? Please help??
Thanks

Logging Into Site (sending Form Data)
i'm trying to post form data to two websites and get the resulting webpage. i can get this to work on other sites, but not these two. i can't figure out why. i'm using a winsock control to do it.




basically, like this:

Code:
Domain = "www." & tmpstring & ".com"
Address = "/login.aspx"
FormData = "fldEmail=" & "blah@domain.com" & "&fldPassword=" & "mypass" ' & "&action=submit" & "&PHPSESSID=" & "865a933771deaae06d3dcf5a220ce5a2"
Winsock1.RemoteHost = Domain
Winsock1.RemotePort = 80
'AddStatus "connecting..."
If Winsock1.State <> sckConnected Then Winsock1.Connect
Do Until Winsock1.State = sckConnected
DoEvents
Loop
'FormData = Replace(FormData, " ", "+")
'FormData = Replace(FormData, vbCrLf, "%0D%0A")
WebPage = "POST " & Address & " HTTP/1.1" & vbCrLf
WebPage = WebPage & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-comet, */*" & vbCrLf
WebPage = WebPage & "Accept-Language: en-us" & vbCrLf
WebPage = WebPage & "Referer: " & Domain & vbCrLf
WebPage = WebPage & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
WebPage = WebPage & "Accept-Encoding: gzip, deflate" & vbCrLf
'WebPage = WebPage & "User-Agent: Mozilla/4.05 [en] (Win95; I)" & vbCrLf
WebPage = WebPage & "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; SPEED; DigExt)" & vbCrLf
WebPage = WebPage & "Host: " & Winsock1.RemoteHost & vbCrLf
'WebPage = WebPage & "Cookie: ASPSESSIONIDSQCACDBQ=KOHEMKPBAJHIFNHBAFDKBBDM; path=/"
'WebPage = WebPage & "Cookie: PHPSESSID=85a52d030721d6d1d9597dc0c4a09585"
'WebPage = WebPage & "Connection: Keep-Alive" & vbCrLf
WebPage = WebPage & "Connection: Close" & vbCrLf
WebPage = WebPage & "Content-Length: " & CStr(Len(FormData)) & vbCrLf & vbCrLf
WebPage = WebPage & FormData & vbCrLf ' & vbCrLf

'Voting = True
blnRetVal = WinsockSend(Winsock1, WebPage)
Do Until sndComplete = True
DoEvents
Loop
sndComplete = False
Text2.Text = m_strHttpResponse


every time tho all i get back is a page telling me to log in. when i've done this before i found that with one site i had to pass a cookie value and also set the referrer value to the site's homepage. but, using the Opera browser, and it's cookie viewer/editor, i've found that i can go directly to the log-in page, delete the cookie that's created, and log in just fine.

i'm passing all of the variables that are in the form inputs, so what else could be missing? i don't understand.

also, with another site that creates permanent cookies (don't expire til 2030 or something) i can simply use the inet control to retrieve the webpage i need (ie mysite.com/members.php). but, if i go to the two sites mentioned earlier, in IE, then try the same thing, while the session cookie still exists, and it won't work.

any help would be appreciated.

Call Logging System Data Duplication.
Hello.

I'm designing a call logging system and have a problem. Data that is posted
to the database is duplicated. A single call can appear 2 -4 times in the
database. I'm using the mscomm control and below is the code I'm using to
read the PABX buffer.

MSComm1.CommPort = 1
MSComm1.RThreshold = 82
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True



The following code runs under the OnComm event.



If MSComm1.InBufferCount 0 Then
tstr = MSComm1.Input
End If

Please help me. Thank you.

Munya
+263 91 847 824

Problem Logging Into Websites And Retrieving Data
i'm trying to post form data to two websites and get the resulting webpage. i can get this to work on other sites, but not these two. i can't figure out why. i'm using a winsock control to do it.




basically, like this:

Code:
Domain = "www." & tmpstring & ".com"
Address = "/login.aspx"
FormData = "fldEmail=" & "blah@domain.com" & "&fldPassword=" & "mypass" ' & "&action=submit" & "&PHPSESSID=" & "865a933771deaae06d3dcf5a220ce5a2"
Winsock1.RemoteHost = Domain
Winsock1.RemotePort = 80
'AddStatus "connecting..."
If Winsock1.State <> sckConnected Then Winsock1.Connect
Do Until Winsock1.State = sckConnected
DoEvents
Loop
'FormData = Replace(FormData, " ", "+")
'FormData = Replace(FormData, vbCrLf, "%0D%0A")
WebPage = "POST " & Address & " HTTP/1.1" & vbCrLf
WebPage = WebPage & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-comet, */*" & vbCrLf
WebPage = WebPage & "Accept-Language: en-us" & vbCrLf
WebPage = WebPage & "Referer: " & Domain & vbCrLf
WebPage = WebPage & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
WebPage = WebPage & "Accept-Encoding: gzip, deflate" & vbCrLf
'WebPage = WebPage & "User-Agent: Mozilla/4.05 [en] (Win95; I)" & vbCrLf
WebPage = WebPage & "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; SPEED; DigExt)" & vbCrLf
WebPage = WebPage & "Host: " & Winsock1.RemoteHost & vbCrLf
'WebPage = WebPage & "Cookie: ASPSESSIONIDSQCACDBQ=KOHEMKPBAJHIFNHBAFDKBBDM; path=/"
'WebPage = WebPage & "Cookie: PHPSESSID=85a52d030721d6d1d9597dc0c4a09585"
'WebPage = WebPage & "Connection: Keep-Alive" & vbCrLf
WebPage = WebPage & "Connection: Close" & vbCrLf
WebPage = WebPage & "Content-Length: " & CStr(Len(FormData)) & vbCrLf & vbCrLf
WebPage = WebPage & FormData & vbCrLf ' & vbCrLf

'Voting = True
blnRetVal = WinsockSend(Winsock1, WebPage)
Do Until sndComplete = True
DoEvents
Loop
sndComplete = False
Text2.Text = m_strHttpResponse




every time tho all i get back is a page telling me to log in. when i've done this before i found that with one site i had to pass a cookie value and also set the referrer value to the site's homepage. but, using the Opera browser, and it's cookie viewer/editor, i've found that i can go directly to the log-in page, delete the cookie that's created, and log in just fine.

i'm passing all of the variables that are in the form inputs, so what else could be missing? i don't understand.

also, with another site that creates permanent cookies (don't expire til 2030 or something) i can simply use the inet control to retrieve the webpage i need (ie mysite.com/members.php). but, if i go to the two sites mentioned earlier, in IE, then try the same thing, while the session cookie still exists, and it won't work.

any help would be appreciated.

Use Of Text Box For 'Real-Time' Data Logging-Feasible?
Hi,
Is it possible to use a text box (list box?)to provide an on-screen 'real-time' record of data samples produced by my application.  An A-D convertor is sampled every 0.5 sec and I would like to record the 'normalised' 8 bit binary data I have converted to decimal with a system 'time stamp'.  Accurately sampling the data is no longer a problem thanks to 'GOLOM's helpful post.

The visual output would be in the format:
data,  system time
data,  system time
data, system time ...etc.

The scrollable text box would display say the most recent say 10 data / time values. The 'top' record in the list would be the most recent sampled data.  But of course the 'height' property of the text box could be adjusted to achieve a sensible displayed record limit.

I can confidently handly multi-dimensional arrays in vb if this is required as part of the solution.  I cant however figure out how to create this 'historic visual data log' which needs regular updating.  My initial thougths steer me towards 'data bound' type objects and arrays?.

Hope you can offer suggestions.

Hafod

Flexgrid Data - Move Row Automatically As Data Type In Textbox
Dear All,

I have hundered of records in Flexgrid & find a particular record is dififcult & if i want to fiind out particulart record from second column so what i want that in one text box as i type the row which have that data move top or move up.

Pls. help me.

Regards
Bright18

How Do I Search Typed Data In Textbox In Data Grid Column
How do I Search typed data in Textbox in Data Grid Column

on Form load Data From Access TAbles loads into Datagrid

am having Textbox When i Typed Certain Name it should search on Selected Column

thanks
Rajesh

Copy Data From Textbox On Form#2 To Textbox On Form #1
I have a flexgrid on form #2, and a textbox on both forms #1 and #2. The code below is on form #2.

When I click the flexgrid, the txtMatlCode.Value is populated based on the item in the row I selected. When I exit the form using the cmdExit function, I am hoping to populate the textbox on the other form with the same information.

Note, both forms are opened (shown) when I execute this part of the code.

Funny thing how it takes hours to do simple things like this, and only minutes to do the real impressive stuff! Anyhow, any help that can be provided is appreciated...

Thanks:



Private Sub msgDataGrid_Click()
Dim lcol As Integer

R = msgDataGrid.Row

For lcol = msgDataGrid.FixedCols To msgDataGrid.Cols - 1
msgDataGrid.Col = lcol
msgDataGrid.CellBackColor = &H80000002
Next lcol

Me.txtMatlCode.Value = msgDataGrid.TextMatrix(R, 1)

End Sub


Private Sub cmdExit_Click()
Dim MACODE As String

MACODE = frmMatlSearch.txtMatlCode.Value
frmPartProp.txtMatlCode.Value = MACODE
Me.hide

End Sub

Textbox Data
I have a form that prompts the user to enter particular parameters for the application I'm building. For example, Text1a , Text 1b, and Text 1c on one line then Text2a, Text2b and Text2c on the next line so forth and so on.

My question is, the data changes depending on how the user sets it up and I want to be able to save the data (changes) and then reopen it when the user closes and reopens the program. Do I have to save to a file for this? and if so, can it be a small text file or does it have to be a database? I only have about 15 different sets or lines of textboxes (3 on each row), so it's not that much info to store.

Thanks

TextBox's And Getting Data
How would i get data from a specific line, in a mutliline textbox.

Access Data And Textbox
I should have read the forums first. Sorry!!


I am creating a program that uses data from an Access database. I can search through the data with no problems....all the data shows in the textboxes. One of the fields, 'Work Log', is a work log from Remedy. The data is displayed as one line. I would like to it be displayed with 'word wrap' so to say. I was wondering how I would do that using a textbox. Thanks again for the help!!

Save Data Textbox
Hello everybody!!!

I have some text box who are results of query.

I want to save my data in textbox when the day change.

I start with weekday (datejour) = 2 = Monday

If today is monday, dataappears in textbox 53,59,65,71,77

Next day, data monday disappears, and data tuesday appears...
I want to save each data days..


Code:
Dim datejour As String

datejour = Format(Year(Date), "0000") & "-" & Format(Month(Date), "00") & "-" & Format(Day(Date), "00")

If WeekDay(datejour) = 2 Then

TextBox53.Value = Sheets("test").Range("bl3").Value
TextBox59.Value = Sheets("test").Range("bo3").Value
TextBox65.Value = Sheets("test").Range("bp3").Value
TextBox71.Value = Sheets("test").Range("w3").Value
TextBox77.Value = Val(TextBox88.Value) + Val(TextBox87.Value)

End If
If WeekDay(datejour) = 3 Then

TextBox54.Value = Sheets("test").Range("bl3").Value
TextBox60.Value = Sheets("test").Range("bo3").Value
TextBox66.Value = Sheets("test").Range("bp3").Value
TextBox72.Value = Sheets("test").Range("w3").Value
TextBox78.Value = Val(TextBox88.Value) + Val(TextBox87.Value)

End If
If WeekDay(datejour) = 4 Then

TextBox55.Value = Sheets("test").Range("bl3").Value
TextBox61.Value = Sheets("test").Range("bo3").Value
TextBox67.Value = Sheets("test").Range("bp3").Value
TextBox73.Value = Sheets("test").Range("w3").Value
TextBox79.Value = Val(TextBox88.Value) + Val(TextBox87.Value)

End If
If WeekDay(datejour) = 5 Then

TextBox56.Value = Sheets("test").Range("bl3").Value
TextBox62.Value = Sheets("test").Range("bo3").Value
TextBox68.Value = Sheets("test").Range("bp3").Value
TextBox74.Value = Sheets("test").Range("w3").Value
TextBox80.Value = Val(TextBox88.Value) + Val(TextBox87.Value)

End If
If WeekDay(datejour) = 6 Then

TextBox57.Value = Sheets("test").Range("bl3").Value
TextBox63.Value = Sheets("test").Range("bo3").Value
TextBox69.Value = Sheets("test").Range("bp3").Value
TextBox75.Value = Sheets("test").Range("w3").Value
TextBox81.Value = Val(TextBox88.Value) + Val(TextBox87.Value)

End If
Bye,

Tahbre

Validating Textbox Data
hi i'm having a problem with my textbox. i want the textbox to only accept numbers. i wnat to create a validation check so that no letters can be inputed. the code starts like this:

Private Sub tel_Change()


please can sumone help me!

thanks

Data Into Next Blank Textbox
Hi,

I was wondering if it possible to do the following:

a) The application searches for a certain value from an out-side source (say an excel file), once the value is found places it in the first textbox.

b) The app. continues to search the file for the next value and does the same, but this time placing the value in the next empty textbox.

I assume the loop would have to reference the index of the textbox to ascertain the next empty textbox.

If anyone could help me out, that would be greatly appreciated.

Thanks again & Rgds,
Dan.

Taking Data From Textbox
i am making an automatic web links launcher

Quote:




Private Sub Go_B_Click()
Dim pid&
pid = Shell("C:Program FilesInternet Exploreriexplore.exe text.Text1")

End Sub




Text1
Text2
Text3
are link bars
and there is a time textbox

program will launch 3 web links
between waiting time (in secınds)
anybody can help?!

Data In Textbox's && Labels
hi,

i have a form with loads of texbox's & labels, all of which contain valuable pre-set data. now ive tested the program & it works as it should, i want to hide these from the user & just keep the command button showing.

whats the easiest method? i thought about putting all the data in an array but then i would have to modify the code throughout, which would be tedious.

thanks in advance,

PMF

Loading Data Into A Textbox.
I need to load a file, (cd-rec.dat, which despite the fact that it is saved as a dat file, it contains data in rtf text format), into a textbox or a richtextbox, I have stored it in C. Can someone give me a sample code?

Thank you

Refreshing Data In Textbox
guys i have a problem here.i am using vb.net and i have bind my textbox with data from my table and can display it, then i add a new record with the usual add command, but the record in the textbox didn't update( which the total record is still not added and i cannot find the record). however, in my database the record is added. When i close my vb and oepn it again, the data shows.
should i close my connection and open it again? how? please help.

TextBox Data Prediction...possible??
Hi al
I have a small problem but somehow cant think of how to solve it.
I have a database with all clients name, address and contact persons.
When I enter an invoice against any client, I want the text box to predict the name. For eg, if the database contains Sam when I type S in the text box it shows Sam automatically. It happens in iTunes while saving Info for any song. Is it possible thru VB?? I use MSAccess to store my database and use Sql queries to retrieve any data.
thanks
any help wil be really appreciated.

Data On A Textbox To Crystal
hi can anyone help me transfer data from a multiline textbox to a crystal report? im using version 8.0 THANKS

Data Report Textbox
Dear group
I have set up a data report to take its data from a recordset that I have executed.(I am not using the data environement).

How do you set up the rpttextboxes so that they can be assigned the correct fields from the recordset. Need to do this from code as I am not using the Data environment.

Is it something like dr1.sections(2).controls etc
The text boxes are in the detail section of the report.

Thanks for any help
Paul

How To Loop The Data Into The Different Textbox?
hi all,

i just want to ask on how can i loop the data into the textbox?for example in the database, there are 2 employeename refer to id number 3 and then i want the datareport to display that 2 employeename.what can i do to do that?plz help.thanks in advance.here is the code.when i run the code the error is "object doesn't support this property or method".

Private Sub DataReport_Initialize()
Dim rs10 As ADODB.Recordset '-> remove any previous declaration of rs
Dim cn10 As ADODB.Connection '-> remove any previous declaration of cn
Set rs10 = New ADODB.Recordset
Set cn10 = New ADODB.Connection
cn10.ConnectionString = "DSN=Data"
cn10.Open

rs10.Open "select employeename from employee ,emp_suratarah,suratarahan where employee.employeeid = emp_suratarah.employeeid AND emp_suratarah.suratarahid = suratarahan.suratarahid AND emp_suratarah.suratarahid = 3", cn10, adOpenForwardOnly, adLockReadOnly
If Not rs10.BOF And Not rs10.EOF Then

Do Until rs10.EOF = True
With DataReport1.Sections("Section1")
.Controls("Text1").AddItem rs10.Fields(0)'-->the error fired here!!
.Controls("Text2").AddItem rs10.Fields(0)

End With
rs10.MoveNext

Loop

End If




rs10.Close
Set rs10 = Nothing
cn10.Close
Set cn10 = Nothing

End Sub

Data From A Textbox Into A Report
Hey guys,
I have data in a large textbox that I want to simply print out in a report. I'm having a lot of trouble getting it working though, I tried setting the control source of a textbox in the report to the textbox on my form, but it doesn't work correctly. Any simple way to do this, basically I have a form with a large textbox and a print button, which I want to print what's in the textbox.
Tom

Changing Data In A Textbox
While I am going thru code I want to beable to update a textbox on a form so I know what step the code is in. I thought


Forms!Frm_Test.txt_Test.Text = ("Text updating to")

Was right,but that isnt working

I am using Access 2000

Get Data Arry From Textbox
please help me....

i have question on getting data arry from textbox.
example :

sayakamudia\
dimanasiapadiapulangpergidatang\
rumahgubukgedung ingkat\
etc

how to get the data and then put in the flexgrid (vb6).

thanks for your kinness.....

Count Textbox Only Contain Data Help!
hi,please help.basically i have 5 textbox, i want to count the total of textbox only contain data.

for example:
text1.text =""
text2.text = 12.2
text3.text = 12.3
text4.text = 12.4
text5.text = 12.4

txtresult = 4 ,it only counting the textbox contain value as a 1.if textbox is empty = 0

please help.thanks.

Put Mshflexgrid Data Into Textbox
Hello to everyone,

In my project i have mshflexgrid in which i am calling data from customer table. i want if i doubleclick on particular row, that row data should come into the text boxes.

i have same no. of text boxes. i try to use row property & connect to textbox but it showing 0 value.

thanks in advance...
Regards
Bright18

Textbox Data Validation
Hi,
I am making a form using VB as a macro for excel, i have a textbox where the user enters data and the data must be a number, how do i check that the data entered contains only numeric values

thanks

Don't Clear Data In A Textbox
Hi everyone there, i have a question here. I have a sub below and the output of the data in the txtStatus will be refreshed whenever the command button was pressed. How do i keep the previous generated data in the textbox?
I'm not sure if the data were automatically cleared when the cmd btn was clicked were due to the codings below.
Anyone knows how do i solve this?



VB Code:
Private Sub MAP_DRIVE(Driveletter As String, servername As String, customer As String, validtest As String, program1 As String)    'Function to map the server connetions    Dim fso As New FileSystemObject    Dim strPassword As String    Dim strLocalDriveLetter As String 'New    Dim strNetworkPathName As String 'New        txtStatus = "Mapping in Process..."    Screen.MousePointer = vbHourglass    'strPassword = "flex123"    strLocalDriveLetter = Driveletter 'assing the drive letter    strNetworkPathName = "\" & servername & "" & customer & program1 & "UFLEX"  '& validtest    'MsgBox strNetworkPathName 'show server path    'MsgBox strLocalDriveLetter        If WNetAddConnection(strNetworkPathName, strPassword, strLocalDriveLetter) > 0 Then        'MsgBox "An Error occurred mapping the drive", 16, "Error Message"        'End        txtStatus = "An Error occurred mapping the drive." & vbCrLf & "Mapping Failed."        Screen.MousePointer = vbDefault    Else        'MsgBox txtStatus.Text & ": Drive successfully mapped!", 64, "Information"        txtStatus = "Drive successfully mapped!"        Call unmap_drives(False) 'do display all the mapped servers        Screen.MousePointer = vbDefault    End IfEnd Sub


Thanks alot.

How To Refresh Data In TextBox?
How do i refresh data that's being read from .txt file in the textbox when i click a command button more than once?

Thanks.

To Get The Data From MSHFlexGrid To A Textbox..
Hi,

How can I do the following:

I have a textbox called txtgetname. This textbox should get the text from MSHFlexGrid1 (From Column 1, Row 1). What is the code, Please?

Regards,


Seema_S

After Clearing Textbox Data Still There
I'm new here so *hello*.

I am currently working on a chat program. I have 2 ways to send a message. The first is to click a button, the second is to click enter.

When you press the button the sub "sendData" in the code module is run.

When you press enter while typing the message the message is also sent.

My txtChat TextBox Multiline property is set to True.

When I press enter my data is sent and the text is cleared but the cursor is on the 2nd line of the txtChat textbox. I am taking an educated guess that this because the enter key sends the ASCII codes 10 and 13. I am also thinking that because the KeyDown event has detected the ASCII 13 it runs, but then the ASCII code 10 is sent to the textbox, so do i need to somehow clear it after the code for the KeyDown has finished, or am i thinking in completley the wrong way??

Thanks for your help.

Code below:


VB Code:
Private Sub txtChat_KeyDown(KeyCode As Integer, Shift As Integer)If Shift = 0 And KeyCode = 13 Then    sendDataEnd IfEnd Sub' I used the KeyDown event so that I could check if the Shift key' was also pressed at the same time as enter. If so then the message' is not sent but the message is a multi-line one.  



VB Code:
Public Sub sendData()With frmMain    .sckMain.sendData (Name & " : " & .txtChat.Text)    .txtChat.Text = vbNullStringEnd WithEnd Sub' The variable "Name" stores - you've guessed it - the users name  


NB: I read that using vbNullString is more effecient as it only stores 2 bytes in memory, and "" stores 6 bytes. Is this true/good practie to use vbNullString then.

Also the same article said that using vbNewLine instead of vbCrLf is also more effecient.


Thanks for your help again.

Parsing Data From A Textbox
Hi Everyone,

I have a textbox called "txtLookup" that holds data like this "GBRfrankym".

How do I code it so that when I push a button it pulls the data from "txtLookup", strips out the "GBR" from it, and then display the "frankym" in another textbox called "txtname"?

I'm not very good at parsing data yet, so any help would be much appreciated. Thank you.

Textbox Data Change?
Is there an easy way to find out if someone made a change in the textbox, like capturing what was in there before and then catch it after it is done?

Seperating Data In Textbox?
I am scanning a credit card and putting the scanned info into a textbox (Credit_Card_Numbeer_Label). Here is what the info looks like:

B5490993935020215^SMITH/CHRIS^05071010000000000000000000000007500000005490993935027005=07071010000075000000

The numbers after the "B" are the CC numbers, then the last and first name is seperated by "/", and the exp. date is the first 4 numbers after the second "^". I am trying pull the CC number, last/first name, and the exp. date. How would I go about pulling the info? Would I just search for the "^" symbol to get the name? What about the numbers for the CC and exp. date? Any help/advice is appreciated. Thanks.

Copyright 2005-08 www.BigResource.com, All rights reserved