Jx_Man 987 Nearly a Senior Poster Featured Poster

see on your start menu program and find folder microsoft visual studio 6.0 tools on microsoft visual studio 6.0 menu. in this folder, running package & deployment wizard tool. you can make setup for your project with this tool. you just following every instruction and add file as u want.

Jx_Man 987 Nearly a Senior Poster Featured Poster

I want to be able to insert data into text boxes and when i press the button store to be able to store the data into the database.

hi george,

so, what the effort from your code?
i think there is nothing wrong with your code..
if u want to insert data with text box, u just add the textbox and change your code a little bit more.

its your code :

insertcommand = "INSERT INTO Reservations (Transaction_Id, Item_Id, User_Id,Current_Date, Reserved_Until, Contact_Name, Contact_Tel)VALUES ('202-MV174', '8596586', '90803', '20/30/2003', '28/30/2003', 'Peter', '07719072955')"

you can change like this :

insertcommand = "INSERT INTO Reservations (Transaction_Id, Item_Id, User_Id,Current_Date, Reserved_Until, Contact_Name, Contact_Tel)VALUES (trim(txtTransactionId.text), trim(txtItemId.text),trim(userid.text),dtpicker1.value.ToShortDateString, dtpicker2.value.ToShortDateString, trim(txtContactName.text),trim(txtContactTelp.text))"

i m sorry if this post not give a current help, cause i didn't find the effort and you didn't show the effort.
Ok. all for the best

Jx_Man 987 Nearly a Senior Poster Featured Poster

try this :
first you must made module to connect access to vb.net
add this following code in your module connected :

Module MyModule
    Public Function Conection() As OleDb.OleDbConnection
        Dim con As OleDb.OleDbConnection
        con = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath.ToString & "\yourDatabaseName.mdb")
        Return con
        con = Nothing
    End Function
 End Module

after that you can call this module in your form code to connect with access db
ex :
Dim Connected = MyModule.Koneksi

then u can open connection (Connected .Open()) or close connection (Connected.close())

OK.
Hope this code helpfull

ITKnight commented: yes +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

yup, this is a solution too. good post guy40az.

Jx_Man 987 Nearly a Senior Poster Featured Poster

check your module connection.if this an be running good, you can't connect with database.so, see the thread which showing by agrothe.

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi,
you mean that u want to make report using access as your database or you make report direct from access and use vb sintax.

actually you must using crystal report to make reporting.

Jx_Man 987 Nearly a Senior Poster Featured Poster

that u ever heard a GAMBAS Programming?
if i didn't wrong, this program like VB and its running under linux. maybe u can use this program, but actually i never tried this program.

OK.

Jx_Man 987 Nearly a Senior Poster Featured Poster

specify database that u want to use. sql server, access, mysql, oracle, etc..

Jx_Man 987 Nearly a Senior Poster Featured Poster

"We only give homework help to those who show effort"

if you never try you'll never know how to write program, but i'll give a clue.
1st make a function or procedure to convert number to word.
ex :
private function ConvetNumToWord(ByVal num As integer)
dim Words as string
' add code to check num from textbox1
if num = 100 then words = "One hundred'
return words
end function

this function will call in event when you click button convert
ex: textbox2.text = ConvertNumToWord(textbox1.text)

Ok.
al for the best

Jx_Man 987 Nearly a Senior Poster Featured Poster
If MsgBox("Your Confirm Message ?", MsgBoxStyle.OKCancel, "Exit confirm") = MsgBoxResult.OK Then
         'add your code to do something if yes button pressed
Else
         ' Do nothing when cancel was pressed
End If

OK.

Jx_Man 987 Nearly a Senior Poster Featured Poster

ok. there is many people ready to help you.

all for the best

Jx_Man 987 Nearly a Senior Poster Featured Poster

if you use integer as id datatype (ex:1.2.3...n)
you can select max from id and add it by 1.

Jx_Man 987 Nearly a Senior Poster Featured Poster

check this link
http://www.asciitable.com/
but i give the ascii table too.

hope this usefull

Jx_Man 987 Nearly a Senior Poster Featured Poster

select the 1st cell of rows

dim i as integer
i = datagrid.CurrentRowIndex()

text = Trim(datagrid.Item(i, 0))
Jx_Man 987 Nearly a Senior Poster Featured Poster

are u using sqlserver? i had error like this before, and actualy you can't to update or add string to double. if your empid is double, you cannot insert with string.
check the fields type again..
Ok. see u

Jx_Man 987 Nearly a Senior Poster Featured Poster

how about this :
Format(today, "hh:mm:ss")

Jx_Man 987 Nearly a Senior Poster Featured Poster

try this if u use access as your database.
1st make module to connect vb with database

Global Conn As ADODB.Connection
Global rs As ADODB.Recordset

Sub Access_Connector()
    Set Conn = New ADODB.Connection
        Conn.Provider = "microsoft.jet.oledb.4.0"
        Conn.CursorLocation = adUseClient
        Conn.Open App.Path & "\databaseName.mdb"
End Sub

then u can call access_connector in ur form.

Jx_Man 987 Nearly a Senior Poster Featured Poster

You must to specify the character in ascci that contains numbers only
Try This following code :

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
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
end sub

Jery
Best Regards

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can change date format :

Ex : Format(Date, "dddd MMMM dd,yyyy")

every days name and month name will be long type

or you can make procedure to convert :

Private Sub Month_Convertion()
   Dim bulan As String
    
    bulan = Month(Date)
    Select Case bulan
    Case 1
        bulan = "Januari"
    Case 2
        bulan = "Februari"
    Case 3
        bulan = "Maret"
    Case 4
        bulan = "April"
    Case 5
        bulan = "Mei"
    Case 6
        bulan = "Juni"
    Case 7
        bulan = "Juli"
    Case 8
        bulan = "Agustus"
    Case 9
        bulan = "September"
    Case 10
        bulan = "Oktober"
    Case 11
        bulan = "November"
    Case 12
        bulan = "Desember"
    End Select
  
  bln = bulan
End Sub

to call this procedure:

Month_Convertion
 lblMonth.Caption = bln

Jery
Best Regards

Jx_Man 987 Nearly a Senior Poster Featured Poster

program start is load form event.what integer?showing effort please.its more help.

OK.see u

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think nothing mistake was happened.
the message error will shown if file was moved, deleted or there was none file.
try to kill other file

Jx_Man 987 Nearly a Senior Poster Featured Poster

open your vb 6
look into toolbar
Add-Ins --> Visual data manager
after that VSM will be opened.
to make new db with vsm :
File -> New -> MsAccess - > Version 7.0 mdb
- save db
you now can make new table and insert field.

Jx_Man 987 Nearly a Senior Poster Featured Poster

actually Shouvik and venkatramasamy was given the solution but if you want to try other way you can use enter keys.

Private Sub Option1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Option2.SetFocus
End If
End Sub

may help.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can change the form properties
visible = false -> to hide form
show in taskbar = false -> to hide from taskbar

if you want to hide application from task manager
add this in your code :
app.taskvisible = true
actually your application not shown in application list but still detect in process list in task manager.

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think peter was given the solution.
opt = Int(Me.TXT_r.Text) - 110
character can't be converted into numeric (int in your project)

try to make exception (try-catch) or you can stinted input in text box, if user input character or letter you can display error message.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can use a function in vb.net to do that (datediff())

dim result as long
        result = DateDiff(DateInterval.Day, dtpicker1.Value, dtpicker2.value)

if you want to get details, you can count month and days by divide the result with days in selected month
in dtpicker

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think Arshad already give the solution

CrystalReportViewer.SelectionFormula() = "{Student.id_student}='" & Trim(txtIdStudent.text) & "' "

Student is the table Name & id_student is parameter

dnk commented: thx :) +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

you must to have a main menu. u can add code in form login to disable sub menu agree with user role.
so when user finished login, user only chosen the sub menu or menu that user depending on.
ex :
Dim Menu As New Main_Menu
Menu.Show()
Menu.x.Enabled = False

x : menu or sub menu in main menu that u want to disable.

this my part project n have same like u. but i didn't use oledbdataadapter, just for comparison.

If cmbRole.SelectedIndex = 0 Then
                        If dtUser1.Rows(0).Item(0) = Trim(txtUserId.Text) Then 'checking user id
                            If dtUser2.Rows(0).Item(0) = Trim(txtPasw.Text) Then ' cheking password
                                If dtUser.Rows(0).Item("ID_ROLE") = 1 Then ' cheking role
                                    Dim menu As New Menu_Utama
                                    Menu.Show()
                                    Me.Dispose(False)
                                Else
                                    MsgBox("You not Admin")
                                End If
                            Else
                                MsgBox("Wrong password!!", MsgBoxStyle.Critical, "Password Error")
                            End If
                        Else
                            MsgBox("Your User Id is not valid", MsgBoxStyle.Critical, "Wrong User_Id")
                        End If
                    Else
                        If cmbRole.SelectedIndex = 1 Then
                            If dtUser1.Rows(0).Item(0) = Trim(txtUserId.Text) Then 'checking user id
                                If dtUser2.Rows(0).Item(0) = Trim(txtPasw.Text) Then ' cheking password
                                    If dtUser.Rows(0).Item("ID_ROLE") = 2 Then ' cheking role
                                        Dim menu As New Menu_Utama
                                        Menu.Show()
                                        Menu.mnUser.Enabled = False
                                        Menu.BarMenu.Buttons(6).Enabled = False
                                        Me.Dispose(False)
                                    Else
                                        MsgBox("You not Headmaster")
                                    End If
                                Else
                                    MsgBox("Wrong Password!!", MsgBoxStyle.Critical, "Password Error")
                                End If
                            Else
                                MsgBox("Your User Id is not valid", MsgBoxStyle.Critical, "Wrong User_Id")
                            End If
                        End If
                    End If

in my project, i have 2 user (Admin & Headmaster)
admin can utilize all menu or sub menu in Main Menu.
Headmaster have same …

Jx_Man 987 Nearly a Senior Poster Featured Poster

how about to use opacity. u can change the value from 100% to 0%.its my opinion.

Jx_Man 987 Nearly a Senior Poster Featured Poster

use cristalreport viewer to see result.
To connect you can use sqldata adapter.
in sqldata adapter configuration u will make connection with your database n choose which database to load n specify the table.
after configuration make new cristal report (.rpt) with configuration.

Jx_Man 987 Nearly a Senior Poster Featured Poster

first you have make a module to connected vb.net with sqlserver.

you can add this code in module :

Imports System.Data
Imports System.Data.SqlClient

Module ModuleName
Public conn As SqlConnection

Public Function GetConnect()

conn = New SqlConnection("server = ServerName;database = DatabaseName;Trusted_Connection = yes")

Return conn
End Function
End Module

you can changes ModuleName,ServerName n DatabaseName with your own.

after you built a module you can call that modul in your form code.
ex :
Dim conn As SqlConnection
conn = GetConnect ()
you will use Conn to open connection (conn.open) and close connection (conn.Close).

Jx_Man 987 Nearly a Senior Poster Featured Poster

this is you the part example code :
Me.BindingContext(DataSet21, "table1").Position = Me.BindingContext(DataSet21,_ "table1"). Count - 1

you make mistake on your code.
delete a underscore sign (_) in (DataSet21,_ "table1").
do same changes to similar code..

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can use dataAdapter n generate dataset. or declare variable as new data set.

Jx_Man 987 Nearly a Senior Poster Featured Poster

how about to use 2 datagrid. first datagrid to list client and second datagrid to list client_id as the client selected on first datagrid. of course you have to use events for each datagrid.

Jx_Man 987 Nearly a Senior Poster Featured Poster

if u used data grid for viewer i have the code :
- first u have a connection module (in this code i used GetConnect to connect to sqlserver)
- in this code dgWhat is datagrid name.

Dim conn As SqlConnection
Dim cmdWhat As New SqlCommand
Dim daWhat As New SqlDataAdapter
Dim dsWhat As New DataSet
Dim dtWhat As New DataTable

conn = GetConnect()
conn.open()
cmdWhat = conn.CreateCommand
cmdWhat.CommandText = SELECT eol_id, firstname FROM eol_info where eol_id like '" & id.Text & "%'"
daWhat.SelectCommand = cmdWhat
daWhat.Fill(dsWhat, "eol_info")
dgWhat.DataSource = dsWhat
dgWhat.DataMember = "eol_info"
dgWhat.ReadOnly = True
conn.close

hope this help.OK

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think if u have menu, u just add code when menu clicked to call reports form.

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think is not difficult to convert from vb6 to vb.net. actually in vb.net you just learn a oop but is not difficult. like the first time you try to learn vb6. post your problem in forum. OK. c u

Jx_Man 987 Nearly a Senior Poster Featured Poster

by check : if Bydate radio is checked you can add code to turn on the next radio button. so when you click Go button once byDate radio will be turn on then you click Go button again. the program will check if bydate is turned on then checked the next radio button.

Jx_Man 987 Nearly a Senior Poster Featured Poster

actually we cant used one programming language 'cause people has many necessary. every programming language has a different power (good and bad), so u can use the best language for problems.

Jx_Man 987 Nearly a Senior Poster Featured Poster

sorted what?

Jx_Man 987 Nearly a Senior Poster Featured Poster

you mean that when user finished login, user access
a form in accordance with the rules?

Jx_Man 987 Nearly a Senior Poster Featured Poster

First declaration a new object for the Form you have to called. So you can use Dim do declare then you can use the new object to call a form as you want.
Example:
The Form Name is CalledForm

Dim call as new CalledForm
call.show()

if you want to close your first Form you can use Dispose().

OK.