I am using a function that is provided by the maker of an IO device that I'm using and the call for this device turns on and off the 16 ports on the IO device by sending the value true or false to the board. The call is as follows:
I have a variable that gets a value in a js function. I need to get its value as a double into a vb.net variable. I have tried putting the variable into a label then grabbing it from the label in vb.net as shown in the code below:
Dim SecondName As String = SecondNameTxtBox.text()Is the above statement a correct one?Here I want to assign the value of the text box into tat "SecondName".If it's wrong, please tell me the correct way to write this statement.
in form 1 -> 1 button in form 2 -> 1 textbox and 1 button
when I click button in form 1, it will show the form 2..how can i pass the variable (data from textbox in form 2) into a variable in form 1 after clicking the button in form 2 ?
Not sure how to do this sub that passes a variable that is used in a Dim. fill_in_field("main_form.WebBrowser1") Sub fill_in_field(ByRef WebBrowser As String) Dim ElementCollection1 As HtmlElementCollection = WebBrowser.Document.GetElementsByTagName("input") End Sub Dim ElementCollection1 As HtmlElementCollection = WebBrowser & "Document.GetElementsByTagName("input")"
This is what I would like. Dim ElementCollection1 As HtmlElementCollection = main_form.WebBrowser1.Document.GetElementsByTagName("input")
I want to know if it's possible to retrieve the variables name from when it was passed into a certain function. For example, if I call parseId(myId) to a function with the signature parseId(id), i can obviously retrieve the value of 'id'. However, is there any way I can retrieve 'myId' as a string (without passing it as another value)? Specifically in vb.net, but I'm interested in how it would work in any given language.
I have a public variable that I declared in form1 of an application. I am trying to call that variable in form2 and then pass that variable in a sql query. If I declare:
Public Class Form1 Public payPeriodStartDate, payPeriodEndDate As Date
How then to I declare that variable in form2 and how to I pass it to my sql query.
Here is the code I have for form1: [Code]
and when I debug this form, no data will appear. I'm sure that it's something wrong with how I'm either calling the variable in form2 or in the query. Can anyone offer any assistance on this?
I have 2 dropdownlists, one is State and the second is City. I am trying to create it so, when a user clicks the State, the second dropdownlist is populated with City names from a datatable.[code]
passing a variable to a sub procedure by reference. Not sure I understand how it works. Here is the code.
Private Sub bntcompute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntcompute.Click Dim x, y As Double getnumbers(x, y) displaysum(x, y)
[code]....
Is the newly modified variable actually being Passed back? and If so where in the statement is it passed back. is it being passed back to the call getnumbers or is it passed back to the statement displaysum?
I'm using MVC2 with jquery.I'm trying to open a partial view in a jquery Dialog container, passing an itemID of an object to be deleted.What I'm doing to accomplish this is passing in an action that renders a view to jquery, which I can get to work without variables.f I try to pass in the ID of the object to be deleted, the action doesn't even trigger.
Here's my jquery code: $(function () { var itemToDelete
Doing a small project where I would like to be able to print the results of certain calculations. I want to open a new form where the data can be neatly presented and printed. I just can't seem to make the data get passed along to the new form when I open it..
I have a useform set up to have a user input value, and I would like to pass that value to a module. I have made the variable public along with the subroutine that I am trying to use the variable in. I have a message box display the value of the variable in the subroutine and the value is 0, even though I have inputted a value in the userform.
[YearForm] Option Explicit Public Sub UserForm_Click() Me.intYear.Integer = Year Module1.OpenFile Year [Code] .....
I have a form with a list box. I'm calling it as a dialog. I can get the result of which button was pressed (OK/Cancel) but how do I get the value chosen from the list?
Dim frmCreateCSVFile As New CreateCSVFile frmCreateCSVFile.dtpFirstEndDate.Value = dtpFirstEndDate.Value frmCreateCSVFile.dtpLastEndDate.Value = dtpLastEndDate.Value
I use VB .NET 2002 (academic version) I have created an MS Access database to be populated with vaules extracted from dBase files. Some numerical values can be null - ie where no data was recorded in the dBase file. Relevant field properties in MS Access mdb table are set to "Not Required" as follows - dt0 is the name in code of the Access table "AllData":
With dt0.Columns .Append("Date", DataTypeEnum.adDate)
colTest.Name = "Ch1Deg"
[CODE]...
Using an INSERT INTO command I can send a null value to the field:
My problem is how to pass a variable which sometimes takes the value System.DBNull.
If I use SQLMdb = "INSERT INTO [AllData]" " ([Date],[Ch1Deg])" & _ " VALUES ('" & dDate1 & "','" & dDeg & "')
Then when dDeg is numeric then there is no problem and the table is populated. When data is missing and dDeg takes the value System.DBNull then it's a no go! The error message is "Data type mismatch in criteria expression."
Is there a way round this with VB .NET 2002 or do I need to upgrade to a later version which has nullable data types, eg nullable integers and doubles etc?
Is there a way to call or pass a variable to another sub? I'm trying to reterive a variable (or even a field name) in somethign like this:
Private Sub PrintPageHandler(ByVal sender As Object, ByVal args As Printing.PrintPageEventArgs) args.Graphics.DrawString(RS("field1"), New Font("arial", 8), Brushes.Black, 5, 5)
I am trying to work with classes and variables and don't seem to understand some behavior that is going on.
first off the class Public Class csSession Public ID As Integer Public Name As String End Class Usage and behavior (example code) Dim S1 as new csSession Dim S2 as new csSession S1.ID = 1 S1.Name = "1st Session" S2 = S1 S2.ID = 99
When I assign S2 = S1 all the values of S1 passes to S2 but also there is a "link" or bond between the two variables now. If I change the values of S2 this automatically changes the values of S1!! Why does this happen and how can I prevent it? I just want to pass the variables values contained S1 to S2.
With the code below data is keyed into a form and inserted into a table called Investors.After it is inserted, I'm trying to redirect back to the same page, passing the InvestorID on the querystring. Simply showing all of the information I just added, kind of insuring that it was posted to the database.
Code: Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
I have a form in Visual Basic that is adding a row of data to an Access Database.What will happen (or rather what I would like to happen) is that when the form is created, a row will be added to said database. Once that row is added, I want to have another form open (called NewWindowA) which will pull information on that database that is related to the ID of the row that was created from the first form.I know that in NewWindowA I need to have the form load the values on Load. But my question is: How do you pass a value to a new window that's invoked by some action?
Windows Forms, VB. I have searched the web for the correct answer to this and no dice. Either they are missing on what I am trying to accomplish or are in CSHARP making it harder for me to see what they are doing. I have a need to pass a record Id from the main windows form into a modal Dialog Load Event.. I have tried throwing a with param in but then I have to change the Load event params and vb flags it.. I am trying to pass the value of _CurrentProp which is an integer into the dialog. This is the dialog constructor and the load event inside that dialog..
[code]...
I am going to simply assign the value to a global variable inside the PropertySettings Class but everything I try seems to fail in one way or another...
I am trying to run a query an Access db from VB. The general query which I want to run is
SELECT * FROM Patient WHERE Patient.PatientID = ? or SELECT * FROM Patient WHERE Patient.PatientLname = ?
I tried using an input box which captured the user input and pass that variable to the query, but that failed.Then I read about writing a function and using that, however, I keep getting an error which says Function not defined, but when stepping through the code, it seems to work. Here is my function:
Module Module1 Public Function LookUpNow(ByVal userInput As String) As String LookUpNow = userInput Return userInput
I am trying to pass some declared variables to a stored procedure. Here is my
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startpayrollButton.Click Dim ssql As String = "select MAX(payrolldate) AS [payrolldate], " & _