Jump to content
Xtreme .Net Talk

trisolve

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by trisolve

  1. I am writing a complex database program with lots of user customizable settings. Most of them are menus. What is the best way to save the settings? File/Registry or other? Please if you can give me an code example that would be great. Thanks! trisolve
  2. Here is what my main sub looks like in the module: Sub main() Dim MyPath As String MyPath = Application.StartupPath MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MyPath & "\azandb.mdb") MyConnection.Open() Dim frmSource As FrmMain frmSource = New FrmMain() Application.Run(frmSource) End Sub
  3. I have 1 module with a public function and 1 main form. The public function in the module is called GetNewSchedule(). I want to change a value of a linklabel in my main form by calling GetNewSchedule() function that is currently in my module. How do I use the WITH statement in my module to accomplish this (changing text values of link label in main form). Thanks a lot!
  4. mocella, i tried your method but I don't think I understood it right. If you can give me an example that would be great. Bucky, I tried setting the value to nothing but all it does is it sets the variable time to its default that is 12:00:00 AM. thanks
  5. How do i set the date/time variable to nothing. e.g for string we could do as follows: mystr = "" but this doesn't work for datetime variable. Help please thanks trisolve
  6. Sorry to bother. I figured out the problem.
  7. I am trying to insert and update time values in the database. I have the time in a textbox and I want to insert that time into the database field say customertime which is of type Date/Time in the database. The sql statement I am using doesn't insert the data into the database returing an error exception. Here is my sql query: MyCommand = New OleDbCommand("INSERT INTO tblTimings (customertime) VALUES ('" & TextBox1.Text & "')", MyConnection) MyCommand.ExecuteNonQuery() Note: The time format in the textbox is correct. Maybe I need to parse the string to datetime format. Any idea? Thanks. trisolve
  8. Sorry guys, I figured this one out as well. Next time I will make sure to post when I get really stuck. :)
  9. I want to show the main form but my startup object is a module with sub main procedure in it that performs necessary arrangments. How can I load and show a form through this module? Here is what I used but the form closes itself after it is done loading. Sub main() Dim MyPath As String 'Get the application directory MyPath = Application.StartupPath 'Specify a connection string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "User ID=Admin;" _ & "Data Source=" & MyPath & "\azandb.mdb" Dim frmSource As New FrmMain() frmSource.Show() End Sub
  10. :) I figured it out. DateTimePicker1.Value = DateTimePicker1.Value.AddDays(1) trisolve
  11. I am using vb.net and I have a datetimepicker with default properties. I also have two command buttons, previous and next. When the user clicks on Next, I want the datetimepicker to add a day into its current value. When the user clicks on previous, the datetimepicker should go back one day. Thanks for help. trisolve.
×
×
  • Create New...