Forum: Visual Basic 4 / 5 / 6 May 9th, 2009 |
| Replies: 5 Views: 658 Hi,
You can make it to Toggle with Single Click:
Write this in Form Load:
chkListBox1.CheckOnClick = True
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 May 9th, 2009 |
| Replies: 7 Views: 1,083 Hi,
Well, the Code Looks Perfect,
I tried the same Code, For a "Memo" field in Access Database, and works Correctly.
Not sure, why it dosent work there.. Any ways, Try Declaring the variables... |
Forum: Visual Basic 4 / 5 / 6 May 8th, 2009 |
| Replies: 7 Views: 1,083 Hi,
Well, If your field is Binary, then you need to use AppendChunk..
Just One more correction, After opening the Recordset, you need to write this line :
rsVEN.Open sSql, dbCon, 1, 3... |
Forum: Visual Basic 4 / 5 / 6 May 8th, 2009 |
| Replies: 5 Views: 658 Hi,
CheckListBox, Automatically Toggles between Check and UnCheck, you dont have to write the code in Click event. Remove all the Code and Check..
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 May 7th, 2009 |
| Replies: 7 Views: 1,083 Hi,
Why do you want to use "AppendChunk" for simple string..?
Try This :
nVNBR = "hi how are yodsf sdf"
rsVen("BITS") =nVNBR
rsVen.Fields("BITS_LENGTH") = 19
' Or |
Forum: Visual Basic 4 / 5 / 6 Apr 28th, 2009 |
| Replies: 1 Views: 338 Hi,
If Product Name is String, then Wrap it with Single Quotes :
Try This :
Set rs = Nothing
Set rs = New ADODB.Recordset
rs.Open "select materials.unit from Materials Where... |
Forum: Visual Basic 4 / 5 / 6 Feb 7th, 2009 |
| Replies: 8 Views: 1,447 Hi,
Try This Code:
Dim FromDate As Date
Dim ToDate As Date
Dim TempDate As Date
Combo1.clear
FromDate = DateSerial(Val(cmbYear.Text), (CmbMonth.ListIndex+1), 1) |
Forum: Visual Basic 4 / 5 / 6 Jan 25th, 2009 |
| Replies: 7 Views: 500 Hi,
Try This :
Text3.Text = Format(Val(Text1.Text)+Val(Text2.Text), "0.00")
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Jan 20th, 2009 |
| Replies: 27 Views: 3,414 Hi,
Install Visual Studio ServicePack6 or higher..
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Jan 19th, 2009 |
| Replies: 7 Views: 1,117 Hi,
You cannot set the Start-Up position for the MDI Child forms in VB6..
This is from MSDN Help:
The initial size and placement of MDI child forms are controlled by the Microsoft Windows... |
Forum: Visual Basic 4 / 5 / 6 Jan 14th, 2009 |
| Replies: 4 Views: 990 Hi,
Declare this API at the top :
Private Declare Function SHGetFolderPath Lib "shfolder.dll" _
Alias "SHGetFolderPathA" _
(ByVal hwndOwner As Long, _
ByVal nFolder As Long, _
... |
Forum: Visual Basic 4 / 5 / 6 Jan 9th, 2009 |
| Replies: 10 Views: 1,206 Hi,
Yes, Little bit tweaking of my code, will do the job:
Dim i As Integer
Dim TAmt As Currency
TAmt = 0
For i = 1 To Grd.Rows-1
TAmt = TAmt +... |
Forum: Visual Basic 4 / 5 / 6 Jan 7th, 2009 |
| Replies: 10 Views: 1,206 Hi,
Try This :
Dim i As Integer
Dim TAmt As Currency
TAmt = 0
For i = 1 To Grd.Rows-1
TAmt = TAmt + Val(Grd.TextMatrix(i, 8)) |
Forum: Visual Basic 4 / 5 / 6 Jan 3rd, 2009 |
| Replies: 27 Views: 3,414 Hi,
Change your where condition to :
Where [Student ID] = ?
Similarly, in the sql statement, enclose all field names with square brackets, or remove Space from field names :
SELECT... |
Forum: Visual Basic 4 / 5 / 6 Dec 22nd, 2008 |
| Replies: 4 Views: 1,220 Hi,
Do you mean DELETING Database..?:
Use simple File Operation
Kill "C:\MyDB.mdb"
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 19th, 2008 |
| Replies: 4 Views: 1,220 Hi,
Using ADO, Create Database at Runtime..
Check this thread:
http://www.daniweb.com/forums/thread118188.html
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 19th, 2008 |
| Replies: 6 Views: 1,134 Hi,
If you Have Named all the Controls Uniformly From 1 To 72, then
You can do all that Calculation in Just 2 Steps.
Some thing Like This :
Dim i As Integer
Dim MyTot As Currency
Dim... |
Forum: Visual Basic 4 / 5 / 6 Dec 18th, 2008 |
| Replies: 6 Views: 1,134 Hi,
Tell me, what are you trying to do with the Procedure Block..
You are checking for what? and What is there in txt6, txt7
Then it will be easy for me to suggest an Alternative solution
... |
Forum: Visual Basic 4 / 5 / 6 Dec 18th, 2008 |
| Replies: 6 Views: 1,134 Hi,
Yes, there is a Limitation of Procedure Size, in VB6..
Looking at your code, appears, there is a Lot of Repeatation,
say for example, this part :
ElseIf txt7 > 0 Then
lblItem6 = "W7~... |
Forum: Visual Basic 4 / 5 / 6 Dec 17th, 2008 |
| Replies: 2 Views: 429 Hi,
In Form Load of Form2, write this code:
Me.Text1.Text = Form1.Text1.Text
(Here you have to show Form2, While Form1, is still Loaded)
OR
In Lost Focus of
Form1's Text1,... |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 15 Views: 863 Change the value of "i " within the loop |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 9 Views: 681 Hi,
Again you have messed up the code.. Why cant Copy My Code neatly....?
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 9 Views: 681 CHANGE SECOND LINE TO :
MSFlexGrid2.Rows = MSFlexGrid2.Rows + 1
Everytime, you populate a row is added..
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 15 Views: 863 Hi,
Try it yourself....
Post the modified code, if there is problem with the code,
we will be glad to help you.
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 9 Views: 681 Hi,
You have messed the code..
change to :
MSFlexGrid2.TextMatrix(MSFlexGrid1.Rows - 1, 1 ) = MSFlexGrid1.TextMatrix(MSFlexGrid2.Row, 1)
Also, why you are hardcoding rows=4..?... |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 10 Views: 810 Hi,
Remove the Single Quotes around Combo selection..
dim strSQL As String
strSQL = "SELECT tblMain.ID, tblMain.Type, tblMain.Site, " _
& " tblMain.Room, tblMain.Area, * FROM tblMain... |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 9 Views: 681 Hi,
Place a CommandButton "Populate" in the Frame,
Initially, Make Grid2.Rows = 1.
Select a Row, in First Grid, and Click On "Populate", write this code for commandClick.
Dim i As... |
Forum: Visual Basic 4 / 5 / 6 Dec 16th, 2008 |
| Replies: 15 Views: 863 Hi,
Once you know the Logic, you can try playing around with the code.. But any way, here is the code:
Dim x As Integer
Dim n As Integer
Dim i As Integer
Dim Tot As Double
x =... |
Forum: Visual Basic 4 / 5 / 6 Dec 15th, 2008 |
| Replies: 15 Views: 863 Hi,
Try this :
Dim x As Integer
Dim n As Integer
Dim i As Integer
Dim Tot As Double
x = val(text1.text)
n = val(Text2.text) |
Forum: Visual Basic 4 / 5 / 6 Dec 15th, 2008 |
| Replies: 15 Views: 863 Hi,
You can write using any of the LOOP Structures,
You already know the Algorithm..
so what is the problem..?
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 15th, 2008 |
| Replies: 27 Views: 3,414 Hi,
Post your SQL statement here..
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Dec 12th, 2008 |
| Replies: 3 Views: 865 Hi,
use SLEEP API
Declare this at the top of the Form's Code window (After Option Explicit)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'To Pause/Sleep for... |
Forum: Visual Basic 4 / 5 / 6 Nov 20th, 2008 |
| Replies: 8 Views: 1,142 Hi,
Index should be the Index name and not the Fieldname..
Data1.Recordset.Index = "indStatus"
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Nov 20th, 2008 |
| Replies: 27 Views: 3,414 Hi,
Yes, You can write all the field names from the table...
eg:
Select EmpID,EmpName From EmpMas Where EmpID = ?
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Nov 18th, 2008 |
| Replies: 8 Views: 1,142 Hi,
If the field you are trying to SEEK is a String, then you have to wrap the search string with single quotes.. Also, SEEK works if the Recordset is open in TABLE mode, and INDEX has been... |
Forum: Visual Basic 4 / 5 / 6 Nov 18th, 2008 |
| Replies: 27 Views: 3,414 Hi,
For Numeric(Long)
adBigInt, Long
For Text :
adVarChar, String
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Nov 15th, 2008 |
| Replies: 27 Views: 3,414 Hi Abu,
Well... Follow these Steps:
Open a Data Project
Add a Connection Object (Configure to your database)
Add A Command Object (Say Command1) And Right-Click
Goto properties and Select... |
Forum: Visual Basic 4 / 5 / 6 Nov 15th, 2008 |
| Replies: 8 Views: 1,240 Hi,
Thnx, Mark the Thread as Solved..
Regards
Veena |
Forum: Visual Basic 4 / 5 / 6 Nov 15th, 2008 |
| Replies: 8 Views: 1,240 Hi,
Its always Better to Keep a Static Boolean Variable in such cases...
Try this :
Private Sub Command1_Click()
Static TFlag As Boolean
If TFlag Then
Picture1.Picture =... |
Forum: Visual Basic 4 / 5 / 6 Nov 14th, 2008 |
| Replies: 4 Views: 792 Hi,
Set this property for the form :
ControlBox = False
Regards
Veena |