309 Posted Topics

Member Avatar for Gus_19

Open file dialog box has a property to open multiple files `openFileDialog1.Multiselect = true`

Member Avatar for poojavb
0
167
Member Avatar for bigzos

What kind of database is it?? Access, MSSQL or MYSQL? I derived a query in Access hope ur colname is a datetime field SELECT * FROM tablename WHERE (format(colname,"yyyy")<Year(Now())-4);

Member Avatar for bigzos
0
99
Member Avatar for jbennet

Is there a function to hightlight some particular word in our comment...as it was earlier green/red???

Member Avatar for Airshow
0
2K
Member Avatar for Sahil89

Process.Start("exeprocessname","filename") eg. `Process.Start("Notepad.exe","C:\text.txt")`

Member Avatar for Sahil89
0
95
Member Avatar for Wolxhound90

First declare the variables and then when u will use the select query make use of reader that will read the value and assign it to the variable eg Dim docid as String Dim docfname as String Dim doclname as String 'connection string Try Dim myCommand As OleDbCommand myCommand = …

Member Avatar for Wolxhound90
0
2K
Member Avatar for Pamilerin

Try this.... Dim i As Integer i = DataGridView1.CurrentRow.Index 'then use the insert query with the parameters like DataGridView1.Item(0, i).Value 'cell value keeps on changing for all cells

Member Avatar for Begginnerdev
0
850
Member Avatar for Hazuan Nazri

what does the searchdatas() function do??? it is not mentioned in the code??? try to write the below code in Textbox change event rather than button click and see open connection first Try Dim myCommand As New SqlCommand With myCommand .CommandText = "SELECT * FROM tablename where columnid like '" …

Member Avatar for poojavb
0
143
Member Avatar for renzlo

first there shud be an insert query to move ur records to the other table and then an update query eg.` insert into newtablename(col1, col2, col3) select col1,col2,col3 from oldtablename` and then an update query based on userid update oldtablename set count=value1,times=value2 where user_id="STEVE20" hope it helps u

Member Avatar for renzlo
0
180
Member Avatar for Samama
Member Avatar for stultuske
0
114
Member Avatar for Gobble45

This worked fine Dim date_now As Date date_now = DateTime.Now Debug.Print(date_now.ToString("yyyy/MM/dd HH:mm:ss"))

Member Avatar for Gobble45
0
217
Member Avatar for Gus_19

I would go with u both Mitja and Unhnd but what if we give the code in specific format like if we tell the user to enter the date suppose **yyddmm** format and on validating event check and then convert the date....if not possible print error msg and if correct …

Member Avatar for bhagawatshinde
0
3K
Member Avatar for ZainabJuma

is the value coming from database??? where are u saving the maximum number??? if the value is coming from database use a select query select max(columnname) from tablename 'columnname shud be the one which will be unique and incrementing after that whatever value u will get convert it to Integer …

Member Avatar for poojavb
0
123
Member Avatar for ThatsSoShaneka

Make sure that the xyz = Mid(lstboxstudents.SelectedItem, 1, 8) has atleast 9 characters in it.... Dim con As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source = Decisionmaths.mdb") Dim xyz As String xyz = Mid(lstboxstudents.SelectedItem, 1, 8) Dim sqlx As OleDbCommand con.Open() sqlx=New OleDbCommand("SELECT * FROM Student WHERE StudentNumber = '"+xyz+"'",con) …

Member Avatar for poojavb
0
525
Member Avatar for Bun2014
Member Avatar for sheelap

I have done the connection but by providing modules...check if it helps u... 1. for ms access Imports System.Data.OleDb Module DBConnection Public Connection As OleDbConnection = New OleDbConnection() Public Function Open_DB_Connection() As String Try Dim EntireFile As String = Application.StartupPath & "\HMS.mdb" Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0.; " & "Data Source=" & …

Member Avatar for poojavb
0
1K
Member Avatar for ponkan20

I tried one method.... Assuming u will have a datetimepicker that will show the due date / it can be a label or text box also just to store the value One label or textbox that will have a due Amount/per day that needs to be paid last the result …

Member Avatar for poojavb
0
1K
Member Avatar for worldindus

For 4th query SELECT distinct first_name,last_name, sum(total_price) FROM Customer, Order WHERE Customer. customer_id=Order.customer_id AND customer.customer_id=87162412 group by first_name,last_name For 5th query select Customer.customer_id, first_name,last_name from Customer, Order WHERE Customer.customer_id=Order.customer_id group by customer.customer_id,first_name,last_name having sum(total_price)>5000

Member Avatar for poojavb
0
280
Member Avatar for jhedonghae

if ur r using vb.net professional than see whether u have the crystal report installed in ur machine...then u will be able to get the crystal report viewer and will also be able to make the reports easily....

Member Avatar for poojavb
0
160
Member Avatar for tendaimare

I guess u want to display the username from the login form to main form after successful login, am i RIGHT?? if txtUsername has the text for username then while calling the second form u can write as below 'this code is to be written in in form1 before calling …

Member Avatar for poojavb
0
106
Member Avatar for paoi00

I have done the same thing for username and password...check if it works for u Why do u write the Item(1) code cant it be just written with reader name and quote brackets column name? `reader("DrName")` if ur case sensitivity code is creating error then check below Try Dim myCommand …

Member Avatar for poojavb
0
246
Member Avatar for tendaimare

But shud I ask u y do u need a datatable if u can login without it??? check my below code Try Dim myCommand As OleDbCommand myCommand = New OleDbCommand("SELECT * FROM userlogin where UserName='" & txtUsername.Text & "' and Password='" + txtPassword.Text + "'", Connection) Dim reader As OleDbDataReader …

Member Avatar for poojavb
0
136
Member Avatar for jhedonghae

while loading the crystal reports pass the database connection along with the username and password and then try to call the crystal report... Dim crtableLogoninfos As New TableLogOnInfos Dim crtableLogoninfo As New TableLogOnInfo Dim crConnectionInfo As New ConnectionInfo Dim CrTables As Tables Dim CrTable As Table Dim cryRpt As New …

Member Avatar for poojavb
0
688
Member Avatar for paoi00

Dim Avail As String = rid.Item(4) what is Item(4) ...u shud write `Dim Avail As String=rid("columname")` and check

Member Avatar for paoi00
0
213
Member Avatar for jhedonghae

I had a code for this...but I was having a text box will tells the interval... Suppose the doctor starts his day at 9 am morning and ends at 6pm evening and the appointment interval is 30 mins then the result will be displayed in one combo box with the …

Member Avatar for Sahil89
0
696
Member Avatar for paoi00

While entering record in combo box make sure that it validates the count Dim countvalue as Integer countvalue=combobox1.Items.Count if countvalue>60 Msgbox("Count cannot exceed 60") else 'code to add the record in combobox End If Hope it helps u... 'Sorry I guess I did not understand the requirement....extremely sorry

Member Avatar for paoi00
0
318
Member Avatar for paoi00
Member Avatar for newbie12345

u can use the below code this code shud be written in form1 where u will redirect it to form2 form2.txtName.Text = txtUsername.Text Form2.show() else u can use the below code in ur form2 load event txtName.Text = form1.txtUsername.Text

Member Avatar for smitty68503
0
5K
Member Avatar for paoi00

u can use the count function in the select query, if the count returns more than sixty values then prompt the message... Dim temp as Integer Try Dim myReader As OleDbDataReader Dim sql As String = "SELECT count(*) as total from tablename where Section='" + combobox1.Text + "'" Dim comm …

Member Avatar for paoi00
0
90
Member Avatar for Sawamura

Dim di As New IO.DirectoryInfo("Your directory path") Debug.Print("di: " + di.ToString) Dim diar1 As IO.FileInfo() = di.GetFiles() Dim dra As IO.FileInfo 'list the names of all files in the specified directory For Each dra In diar1 lstFiles.Items.Add(dra) 'all files present in the directory are viewed in list box Next hope …

Member Avatar for Sawamura
0
2K
Member Avatar for mikeybware

Add paranthesis and use the OR instead of AND and see if it works...if u r grouping it means it has to fulfill the condition...

Member Avatar for poojavb
0
179
Member Avatar for jhedonghae

What does ur combobox1 contains and what is in combobox3 Private Sub ComboBox3_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ComboBox3.Validating If ComboBox3.Validating Then con = New OleDbConnection("Provider= Microsoft.ACE.oledb.12.0; Data Source=C:\Users\edenzam\Desktop\CBFMNHS Enrollment System\CBFMNHS Enrollment System\bin\Debug\Enrollment System.accdb") Dim ewaaa As String = "Select * from SchedulingTwos where YearLevels = '" …

Member Avatar for jhedonghae
0
131
Member Avatar for mp9036

The separator value takes the year value as whenever ur will enter any other format for date except for separator as "," it will show the error and the error is at where u have initialized year... add the try catch block before the initialization as below and check one …

Member Avatar for poojavb
0
94
Member Avatar for 3nrichedd

Another approach is to validate the input string before performing the conversion using Java regular expression. I like that second approach because it is more elegant and it will keep your code clean. public boolean isInteger( String input ) { try { Integer.parseInt( input ); return true; } catch( Exception …

Member Avatar for poojavb
0
241
Member Avatar for TriaL11

Dim abc As String abc = TextBox4.Text If abc = "" Then MsgBox("Empty") Else If ListBox1.FindString(abc) <> True Then MsgBox("Got it") Else MsgBox("Not") End If End If

Member Avatar for poojavb
0
245
Member Avatar for paoi00
Member Avatar for poojavb
0
192
Member Avatar for paoi00
Member Avatar for paoi00
0
206
Member Avatar for agilocha

Enter the correct cell no and then on the click of the row in datagrid view u will get the cell value in the text box textbox1.Text = DGS4.CurrentRow.Cells(0).Value

Member Avatar for poojavb
0
199
Member Avatar for kampao00

try the below one Private Sub ComboBox3_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ComboBox3.Validating If ComboBox3.Validating Then con = New OleDbConnection("Provider= Microsoft.ACE.oledb.12.0; Data Source=C:\Users\edenzam\Desktop\CBFMNHS Enrollment System\CBFMNHS Enrollment System\bin\Debug\Enrollment System.accdb") Dim ewaaa As String = "Select * from SchedulingTwos where YearLevels = '" & ComboBox1.Text & "'" com = …

Member Avatar for Mitja Bonca
0
196
Member Avatar for darthswift00

Whenever u write a coding for Database connection use the try catch block Try ' *ur complete code goes here * Catch ex as Exception MsgBox(ex.Message) ' if u get an error in above coding it will be passed to catch block and will display the error End try

Member Avatar for darthswift00
0
176
Member Avatar for kampao00

Use a list box instead of list view before the code clear the list box every time else the value will be repeated... use a distinct function in ur select query if the query is returning duplicate values after the executer use a `debug.Print("Query: "+ acscmd.CommandText) ` it will help …

Member Avatar for kampao00
0
147
Member Avatar for dejanc

use this `TextBoxDataKode.Text = DGS4.CurrentRow.Cell(0).Value` instead of `TextBoxDataKode.Text = DGS4.Item(1, GridView.SelectedRows(0).Index).Value`

Member Avatar for poojavb
0
3K
Member Avatar for raheel88

I have done this thing...chec below if it helps u 'Path1 is a string variable declared globally Dim di As DirectoryInfo = New DirectoryInfo(Application.StartupPath & "\Images\" + patientname + Date.Today.ToString("yyyy.MM.dd")) --- checked if a directory exists If Not di.Exists Then 'if no create the directory di.Create() Dim fileLoc As String …

Member Avatar for raheel88
0
185
Member Avatar for darthswift00

darthswift00 - I guess for select query u should write `ExecuteQuery()` and not `ExecuteNonQuery()`

Member Avatar for poojavb
0
129
Member Avatar for kampao00

Y use a variable??? u could have also done without a variable...just suggested... TextBox9.Text = login.LevelofAccessTextBox.Text

Member Avatar for jhedonghae
0
139
Member Avatar for jbutardo

if ur format is MMM-yyyy then u will get the output correctly....but the date will be wrong...it will be the first of the month...

Member Avatar for poojavb
0
196
Member Avatar for reds8

this code shud be written SELECT td.num,SUM(td.cost) AS Total,tp.prize FROM tblData td, tblPrize tp WHERE td.num = tp.num GROUP BY td.num, tp.Prize

Member Avatar for poojavb
0
157
Member Avatar for ZainabJuma

In ur insert query u can use the following to get the date.... Date.Today.Year.ToString and then concatenate the remaining value to the string

Member Avatar for poojavb
0
99
Member Avatar for poojavb

Hello Friends, I need idea for my below process... I have one medical prescription form in my table....which will generate bill...and a receipt number will be generated in crystal reports.... If suppose a bill is generated for a particular transaction and after suppose few days i need a duplicate bill....how …

Member Avatar for poojavb
0
100
Member Avatar for poojavb

Hello Friends, I need one help I have a datetimepicker control, a combobox with day i.e. Sunday, Monday and so on.... The datetimepicker min date will be todays date and max date will be more 7 days...i.e. a week... so the days dont get repeated..means sunday will come only one …

0
84
Member Avatar for poojavb

Hello Friends, I want a small help... I have created a text box....a button and a date time picker control I have showed the calander control on click of the button event....when a value is selected in the datetimepicker the value should be showed in the text box... I have …

Member Avatar for Mitja Bonca
0
247

The End.