Skip to content

Visual Basic

Visual Basic Questions

This category can be followed from the open social web via the handle visual-basic@forum.codeproject.com

34.4k Topics 120.1k Posts
  • Assigning date in VB for Access database

    database help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    try... Dim strLinkCriteria as String strLinkCriteria = "MyDate = #" & Me.ctlWhatever & "#" the principle being that 1) any string that can be evaluated as a date, and 2) is enclosed in #'s, will 3) be evaluated as a date, so if Me.ctlWhatever.Value = "2/28/03" then... strLinkCriteria = "MyDate = #2/28/03#" 'm/d/yy :zzz: no matter where you go, there you are
  • form unload

    help question
    2
    0 Votes
    2 Posts
    0 Views
    J
    Hi ! I guess this won't help, but I tried to do this : Private Sub Form_Load() MsgBox "Hi !" Unload Me End Sub and everything works fine. Are you doing something special into the Form_Load event ? Jerome
  • ListView

    question
    2
    0 Votes
    2 Posts
    0 Views
    J
    Hi, For example, if your listview (lswMyListView) has two columns, and you want to transfer the selected row into two textbox (txtColumn1 and txtColumn2) you have to do that (for instance, in the lswMyListView_Click procedure) : txtColumn1.Text=lswMyListView.SelectedItem.Text txtColumn2.Text=lswMyListView.SelectedItem.Subitems(1) Hope this helps ! Jerome
  • VB.NET and XML

    csharp database data-structures xml
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Returning more than 1 value from a function

    question csharp database game-dev
    3
    0 Votes
    3 Posts
    0 Views
    X
    Thanks Ray that kinda helps... but i'm still not sure why i'm doing that... Maybe i didnt explain it good enought.. I making an array, that has 3 members (name, genre, rating) Overall i want a little menu 1) Add a game 2) Display a game 3) Show average rating of games 4) Quit Something like that..so first i made a sub prodecure that displayed this menu (so i can call it after each option the user makes), that was all good So the sub main looks like this so far Private Sub Main() Dim gamesArray() as Game 'Game is a declared structure above sub main) Dim choice as integer call DisplayMainMenu() choice = console.readline() End Sub So then I started to do this: Private Sub Main() Dim gamesArray() as Game 'Game is a declared structure above sub main) Dim choice as integer call DisplayMainMenu() choice = console.readline() If choice = 1 then * call AddGame() End if End Sub Private Function AddGame() console.write("Enter the game name: ") name = console.readline() console.write("Enter the genre: ") genre = console.readline() console.write("Enter the games rating: ") rating = console.readline() End Function *** So my question being, if i get the info for the game in the function.. i somehow need to get all 3 pieces back up into the array... Hope this clarifies things...:-D EDIT: Sorry forgot the IF ______________________________________________ "I'm not me when I dream...anymore." -TRUSTcompany
  • Toolbox items grayed out

    csharp html visual-studio design question
    3
    0 Votes
    3 Posts
    0 Views
    S
    Actually, the HTML tools are there, the ones I can't get to are the web form tools. I am editing ascx, aspx and they don't show unless I'm in design mode..
  • How to assign a date to a date object

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    H
    temp = #February 12, 1985# you put any valid date expression between two #
  • instance checking

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • newbie needs help

    help csharp design tutorial
    2
    0 Votes
    2 Posts
    0 Views
    P
    Do you mean the Combo Box control? If so then you use the Add method of the Items collection. ie. comboBox1.Items.Add("New Item")
  • 2 questions

    question
    2
    0 Votes
    2 Posts
    0 Views
    P
    Q1) Isn't that with the DoubleClick event? and then you use the SelectedItems property to get the items that were selected, probably only 1 if it's a double click. If I'm wrong, sorry, I haven't messed with the List View control much yet.
  • Problems deploying app

    question database com help csharp
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Printing with Data Environment

    database help workspace
    3
    0 Votes
    3 Posts
    0 Views
    B
    Thanks I tried that and get a new message 'Failed getting Rowset(s)from current data source' One step closer but still no joy :~
  • Access a folders properties programmatically

    sysadmin help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Good Book on CrystalReports with VB

    tutorial learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • secure mdb file

    tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Try to send email

    help csharp sysadmin debugging
    3
    0 Votes
    3 Posts
    0 Views
    A
    Thank you for your help. It seems so obvious :-O, but none of the examples or references I had found, actually said that. I set it to the name of our mail server, and it worked.
  • ADO or RDO

    database c++ sysadmin question
    2
    0 Votes
    2 Posts
    0 Views
    R
    Think that you may be misunderstanding things here a little. If you specify a DSN in an ADO conneciton string, the conneciton will actually go through the ODBC driver / layer. However, if you specify a connection string of the format: strConnString = "Provider = SQLOLEDB;Database=; Datasource=" Then the OLEDB provider for SQLServer will be used to connect to the machine specified by and the database specified by . You'll also have ot provide a UID and PWD though.
  • VB Help files

    html help question
    2
    0 Votes
    2 Posts
    0 Views
    H
    You can use RTF (using msWord for example) and convert them to *.hlp file (traditional Winhelp) I read about that in (SAMS teach yourself VB6 in 12 days).. but I did not try it myself
  • unloading a form at load time

    help database question
    2
    0 Votes
    2 Posts
    0 Views
    H
    try this and let me know :) If RS.BOF And RS.EOF Then MsgBox "No orders yet today", vbExclamation, "No records returned" Conn.Close rs.Close Set Conn=Nothing Set rs=Nothing Unload Me Exit Sub End If
  • [Q] ADO Recordset Events in VB6

    database mysql question
    2
    0 Votes
    2 Posts
    1 Views
    H
    MySql is a valid insert command independently tested I think first open doesn't fire events because it does not change the rs it just inserts records in the DB but the second is a select satement that changes the rs