309 Posted Topics

Member Avatar for major_lost

U can paste ur solution so that it would be helpful for someone else who need the same....

Member Avatar for poojavb
0
77
Member Avatar for london-G

u can also try to first clear the combo box items before adding the values to it....

Member Avatar for poojavb
0
127
Member Avatar for salman_hundekar
Member Avatar for poojavb

Hello Friends, I need help to get the time value from MSSQL database to VB.Net Datetimepicker I have a datetimepicker but the custom format is set to HH:mm tt so that I can get eg 11:20 AM this value I have stored in database with the help of ` Label4.Text …

Member Avatar for poojavb
-1
1K
Member Avatar for salman_hundekar

Please explain in details.... when are u getting this error?? what is the object related to this error???

Member Avatar for salman_hundekar
0
183
Member Avatar for Iamateur

After else if u need to mention the condition and then continue with the code....if no condition is present then just use else show the exact code what u have done after adam_k has post so we can help u more on it...

Member Avatar for Iamateur
0
262
Member Avatar for razree

you forgot the word Add.... it shud be Listview1.Items.Add and then the reader.... Try Dim myCommand As SqlCommand myCommand = New SqlCommand("SELECT * FROM DoctorRegister ", Connection) Dim reader As SqlDataReader = myCommand.ExecuteReader While reader.Read ListView1.Items.Add(reader.Item("FirstName")).Selected = True End While Catch ex As Exception MsgBox(ex.Message) End Try selectedItem is not …

Member Avatar for razree
0
2K
Member Avatar for themaj

set a masked Text box and set the mask as 00,000,000 and the database datatype can be varchar to retrieve this data....hope it helps u....

Member Avatar for themaj
0
363
Member Avatar for aimboter89

For deleting data with the help of datagridview and updating in access u can use 'Open connection Dim i As Integer Dim ID As String i = DatagridView1.CurrentRow.Index ID = DatagridView1.Item(0, i).Value 'whichever will be primarykey or unique data Try Dim MessageText As String Dim myCommand As OleDbCommand myCommand = …

Member Avatar for aimboter89
0
189
Member Avatar for pritesh2010

The above query will show BidTime as Desc and BidAmount as Asc.... But according to the criteria 1. Assign Highest Rank of based on Max BidAmount. 2. If Bid Amount gets tie with other user then who ever enter bid amount first he will get the high Rank So just …

Member Avatar for poojavb
0
168
Member Avatar for nanako

Are you looking for this?? Private Sub DataGridView1_CellClick(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick Dim i As Integer i = DataGridView1.CurrentRow.Index Form1.TextBox1.Text = DataGridView1.Item(1, i).Value.ToString Form1.TextBox2.Text = DataGridView1.Item(2, i).Value.ToString End Sub Ohhh...sorry...this code is in vb.net....

Member Avatar for poojavb
0
152
Member Avatar for bazzer14

Whatever Jim has given it works...add few more lines of code Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click 'checked on button click Dim found As Boolean = InListView(ListView1, ComboBox1.Text) If found = True Then MsgBox("Exists") Else 'MsgBox("No") ListView1.Items.Add(ComboBox1.Text) End If End Sub Private Function InListView(lvw, text) As …

Member Avatar for bazzer14
0
128
Member Avatar for mie.ilani

Please explain ur problem in detail....only showing the code might not help....

Member Avatar for poojavb
0
129
Member Avatar for abathurst
Member Avatar for elitely

if u want a clear cell that use "" instead of Test4... It will be good enough if u be more specific....n number of people will be able to help u....

Member Avatar for elitely
0
4K
Member Avatar for Ruan10

Duplicate thread [Click Here](http://www.daniweb.com/software-development/vbnet/threads/423693/windows-form-applications-vb..-please-help)

Member Avatar for Reverend Jim
0
595
Member Avatar for dangerousd28

the below thing I had done in my change password code...check if this helps u.... this code I had written in a button click event.... 'Open connection If txtUName.Text = "" Or txtOldPwd.Text = "" Or txtNewPwd.Text = "" Or txtCNPwd.Text = "" Then MsgBox("All fields are mandatory") Else If …

Member Avatar for dangerousd28
0
226
Member Avatar for poojavb

Hello Friends, I need to create a report for my project I am using Miscrosoft Visual Studio 2010 and the SAP crystal Report I am not able to set up the connection The SQL server that I am using is not coming in the drop down of the server part …

Member Avatar for Katie Kate
0
782
Member Avatar for weeraa

Hey thanks...it worked perfectly fine...even I needed the same....Thanks _avd

Member Avatar for poojavb
0
156
Member Avatar for Mechizedek

you can create a module and then call the module whenever u need a database connection.... this will help you to update the changes in your database only once if u need to change it anytime in future,,,,else u need to change in each and every line if u dont …

Member Avatar for Mechizedek
0
175
Member Avatar for NtheN

to pass the value in combo box u can use.... Dim conn As New SqlConnection(ConnectionString) Dim strSQL As String = "your sql query" Dim da As New SqlDataAdapter(strSQL, conn) Dim ds As New DataSet da.Fill(ds, "Tablename") With ListBox1 .DataSource = ds.Tables("Tablename") .DisplayMember = "ColumnName" 'column name to be displayed in …

Member Avatar for poojavb
0
90
Member Avatar for vammy

write below code in ur button click event textbox2 is the field where u will enter number MsgBox(ConvertNum(TextBox2.Text)) Then write the below function Public Shared Function ConvertNum(ByVal Input As Long) As String 'Call this function passing the number you desire to be changed Dim output As String = Nothing If …

Member Avatar for salman_hundekar
0
141
Member Avatar for dre-logics

select a.item_number, a.itemdesc,c.colordescription,m.monthdescription from article a, colors c , month m where a.colornumber=c.colornumber and a.monthnumber=m.monthnumber

Member Avatar for dre-logics
0
192
Member Avatar for mancode1007
Member Avatar for poojavb
0
117
Member Avatar for poojavb

Too weird but still I have a doubt.... I have two table.... -> OutpatientDetails -> InpatientDetails But the fieldnames are same except for the ID....i.e. OutPatientID and InPatientID respectively..... I want to combine both the tables and produce one output.....I dont know whether it is possible or no.... I want …

Member Avatar for poojavb
0
165
Member Avatar for Gus_19
Member Avatar for smitty68503

Write the event in combobox1 selectediIndex change event...make correct connections Try Dim myCommand As New SqlCommand With myCommand .CommandText = "SELECT ordernumber,orderdate,itemname,quantity,RepairNumber FROM orderstable WHERE OrderNumber = '" & ComboBox1.Text & "'" .CommandType = CommandType.Text .Connection = conn End With Dim dt As New DataTable dt.Load(myCommand.ExecuteReader) With DatagridView1 .AutoGenerateColumns = …

Member Avatar for smitty68503
0
207
Member Avatar for Gus_19
Member Avatar for Begginnerdev
0
108
Member Avatar for poojavb

Hello Friends, I need to develop a birthday reminder form in my project.... The list of all patient that are celebrating birthday on that particular day and month...leaving the year.... My database is SQL server and I have used date datatype for it.... So I can I get the month …

Member Avatar for poojavb
0
1K
Member Avatar for themaj

try the below text for all the textboxes keypress event... 'accepts only numbers If (Microsoft.VisualBasic.Asc(e.KeyChar) < 48) Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 57) Then e.Handled = True End If If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) Then e.Handled = False End If This will be too lengthy I guess...coz u will have to code for …

Member Avatar for themaj
0
156
Member Avatar for nmges
Member Avatar for Gus_19

if user clicks on X button call the save_click event in the form_formclosing event.... before that u can ask the user with a msg box whether the user wants to save the form or just close without saving.....if user wants to save call the save event else dispose the form... …

Member Avatar for Begginnerdev
0
129
Member Avatar for priyamtheone
Member Avatar for Iamateur

Try if the below code works fro u.... con.Open() cmd = New SqlCommand("SELECT COUNT(*) FROM IssueMBA WHERE ida='" + TextBox1.Text + "' and rda='" + TextBox2.Text + "'", con) 'here u are giving and condition and not between check one.... dr = cmd.ExecuteReader() If Not dr.Read() Then MsgBox("Invalid details") Else …

Member Avatar for Begginnerdev
0
108
Member Avatar for aditya barge
Member Avatar for aminevb

if these are the only fields in ur table client then y use the field name just use the parameters one mistake is u shud use datetimepicker1.value and not text Give a try Try Dim ConStr As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\projet.mdb" Dim Save As OleDbCommand Save = …

Member Avatar for Begginnerdev
0
92
Member Avatar for ebanbury

Is fullname alos a columnname in the table or just an alias u r giving to the concatenation of fname and lname if it is a column name then I guess it wont go into the column else if it an alias then try below code SELECT DISTINCT DEV_user_registration.reg_fname + …

Member Avatar for ebanbury
0
184
Member Avatar for s98samman

Dim b As Integer = CInt(TextBox2.Text) Dim c As Integer = CInt(TextBox3.Text) Dim a As Integer = b * c MsgBox(a)

Member Avatar for JGorard159
0
563
Member Avatar for bigzos

SO how do u want to display the date difference??? in months, year or days??? whatever parameter u will give in the date diff function it will be dependent on that....

Member Avatar for poojavb
0
135
Member Avatar for breakzzzz20

When I added ur block of comment in eclipse and tried to execute it ...it showed a lot of errors for variables like total_ot_income is not resolved and many so on.....One closing brace bracket is missing at the end also...try to paste the complete code again and also the error …

Member Avatar for behemothdave
0
438
Member Avatar for poojavb

Hello Friends... I need help on regular expressions.... I tried the following way but it did not work for me....please help me to create a regular expression... ^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(^[a-zA-Z0-9@\$=!:.#%]+$) My requirement is -> Min 8 to 15 characters - this I will do with the length validation or by including in …

Member Avatar for poojavb
0
250
Member Avatar for eongchin
Member Avatar for zeqe

U can directly use the text boxes instead of using property just giving an example If I want a value from form1 to form2 then I use following way code in form1 Textbox1.Text=Form2.Label1.Text In this way it wont open a new form....In your code u have used > Dim obj …

Member Avatar for zeqe
0
178
Member Avatar for poojavb

Hello Friends, I have three table ->PatientDetails ->ParentDetails ->InsuranceDetails -Patient id is the common column in all the three tables... While saving the data in table using VB.Net there is a column in PatientDetails i.e. Insured If the patient is insured then only the values from text boxes and the …

Member Avatar for poojavb
0
335
Member Avatar for collin_ola

[QUOTE=collin_ola;1780471]Hi, I have a form in VB which is scrollable (using autoscroll) and when I currently click 'print', it only prints what I can see; it takes a screenshot of the viewable information. Here's my code: [CODE]Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click Dim settings …

Member Avatar for n71423
0
2K
Member Avatar for renzlo

what type of database are u using....coz the query is different in SQL and access

Member Avatar for renzlo
0
380
Member Avatar for Mike Bishop

Is your splash screen the startup form??? if so try to make it as `visible= false`.... if it is a start up form and u try to close the splash screen then the complete application will exit,,,

Member Avatar for Unhnd_Exception
0
2K
Member Avatar for Pamilerin

to display data in the datagrid use the below code and then call the method with datagridview Note- in select query call only the fields that u want to display in your datagridview1 Public Function GetData() As DataView 'open connection Dim SelectQry = "SELECT * FROM Pricelist WHERE [SECURITY] ='" …

Member Avatar for Pamilerin
0
855
Member Avatar for aminevb
Member Avatar for sidyusuf

TextBox1.Text = DateTimePicker3.Value + " " + DateTimePicker4.Value Note - DateTimepicker3 has date and Datetimepicker4 has time in it....the value will be displayed in textbox4...and the datetimepicker values are separated by a space check if u needed the same....

Member Avatar for poojavb
0
1K

The End.