Home - Tables required - Setting up database driver and references - Code with comments
Library Management System - Documentation
Some not-so-common VB functions and control events that I've used.
Text Box:
Text1.MaxLength will specify maximum length of string that the text box can
accommodate.
Ex: Text1.MaxLength = 5 will only let 5 characters be inserted into
the textbox.
List Boxes:
Adding Item
List1.AddItem "This is a sample starting string " & some_variable & "
some ending string value"
Explanation : In the above syntax, Strings can be concatenated with variables
using the '&' symbol.
Removing Item
List1.RemoveItem List1.ListIndex
Explanation : In the above syntax, List1.ListIndex will give the index value
of currently selected value in the listbox.
List1.RemoveItem List1.ListIndex will remove the currently selected item from
the listbox.
Getting Selected items text content
List1.text
The above will return the text of the currently selected item.
The click event for listboxes
Private sub List1_Click()
-----
-----
Statements that run if listbox is clicked on and something is selected
-----
-----
End Sub
So, if you want to assign the selected items text to a textbox (as I've done..
seen later), you can insert the following code.
Ex:
Private sub List1_Click()
Text1.text=List1.text
End Sub
Goto Tables required