|
Why are you using VB6 ?
Because that's the only development product supported by Microsoft. And they have planned to support it till 3020. That's worth learning VB6.0. If you haven't started learning it,I can say your future is at stake!
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Why do you use bold text and caps in that manner? When I do that, it's because i want to annoy the person i'm writing to. Do you want to annoy us? All of us? 'Cause this is a public board, compadre - when you post, you're addressing each and every one of the readers. And addressing us in this way is a sure way to make new enemies.
But who is the king of all of these folks?
|
|
|
|
|
i don't want to annoy anyone. i am using bold text to show the importance of that sentence. for e.g:- i use bold text for the name of a textbox object, so that all should be able to recognise that it is the name of the textbox. i think all of u misunderstood me. And another major problem is that i have a low config computer. It does not support .NET and SQL. It becomes too heavy if i install .NET. that's why i am using VB 6.0 and Access.and i know i'll be able to convert it into .NET project afterwards, but till then i have to use VB 6.0 and Access.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
Vikrant Badhai wrote: Awaiting for help.
Get yourself a book on SQL and use Google for ADO. That Find method is only going to work on a result set AFTER the DB was queried (this may make a difference depending on how the recordset was created). Most of this should be covered in just about any beginner's text.
Also, VB6 is dying (a lot is still in use as old code). If you have to use VB, you may wanna look into VB.NET instead.
|
|
|
|
|
Jeremy Falcon wrote: VB6 is dying
Can someone put it out of its misery?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Vikrant Badhai wrote:
I am Developing a software using VB6.0 as Frontend and MSAccess as Backend.
why? VB6 is dead and no longer supported by Microsoft, and Access is better replaced by SQL Server 2005 Express. You really should update your skill set top more upto the moment tools and technology
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi!
My aim is to associate two checkboxes in different forms. For example lets say that Form2 has a checkbox and when I check it and close the form2, I want other checkbox to be checked in Form1.
I would like to know how it would be possible in runtime processing.
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Assuming form2 is opened from form1
You will need form2 to have a reference to the open instance of form 1
This can be achieved by passing me to form2
dim oFrm as new Form2(me)
In the checkchanged event on form2 you can then manage the checkbox on form1
This can also be handled in the formclosing event.
The trick is to pass the form1 instance to form2
|
|
|
|
|
The best way to do this, is to set up delegates between the two forms. The nasty way, is to pass references to your forms about and make the checkboxes public.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian do you know of an article demonstrating the delegate operation - I'd be interested. While I don't recall ever actually doing this with 2 forms I had not pursued the delegate option.
TIA
|
|
|
|
|
|
Hi,
I have a datagrid and a checkbox template column is bounded to it on the 1st column. I want to check/uncheck all the checkboxes at once when user click the check/uncheck checkbox in the header template. I got the all the sample codes in Javascript and asp. But not for vb.net window application. Can anyone guide me the codes on window application? It would be grateful if you already have the reference and send it to me.
Thanks a lot for ur help.
|
|
|
|
|
I found this article here on Code Project.
http://www.codeproject.com/KB/grid/DataGridView_winforms.aspx[^]
I converted the below method for you, from C# to VB.NET. Just wire up this event handler and set the column index to match your data grid layout. The below code assumes that the CheckBox column is the first column, so if your is not, you'll need to make a few changes:
Just change the two following lines of code and replace the "0" with the correct column index.
If e.ColumnIndex = 0 Then
dataGridView1.Rows(i).Cells(0).Value = dgvColumnHeader.CheckAll
Private Sub dataGridView1_ColumnHeaderMouseClick(ByVal sender As Object, ByVal e As DataGridViewCellMouseEventArgs)
If e.ColumnIndex = 0 Then
For i As Integer = 0 To dataGridView1.Rows.Count - 1
dataGridView1.Rows(i).Cells(0).Value = dgvColumnHeader.CheckAll
Next
End If
End Sub
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi Karl,
Thanks for the sharing. But in window form it doesn't have DataGridViewCellMouseEventArgs.
What shall I change it to?
Appreciate your help again.
Thanks.
cheers,eunice
|
|
|
|
|
My bad. It's been a very long day.
It's the same event, ColumnHeaderMouseClick just different signature.
Private Sub myDataGrid_ColumnHeaderMouseClick(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles myDataGrid.ColumnHeaderMouseClick
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi,
Can anybody please help me in getting a combobox in a particular column of datagrid. If possible please give me a code snippet.
Thanks,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
|
Hi
I have a project written in VB & I want to call a C++ code inside my project
How can I do that?
Or it is easier to change the second code to VB
Can anyone help me pls?
|
|
|
|
|
The only way to do that is if the C++ code was compiled into a .DLL library. You cannot directly call C++ code if all you have is the C++ source code.
|
|
|
|
|
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
www.wickedorange.com
www.andrewvos.com
|
|
|
|
|
I am trying to determine if a EmployeeNumb exits in the Access table below. The function I am using is outlined below, buy I get an exception error that there is not data in Row(0). can anyone help me out with identifying the problem? TIA
Sub TimeAlloc()
Dim strSelectNum As String
Dim sda As OleDb.OleDbDataAdapter
Dim dsEmployeeTime As DataSet
Dim cmdDatabase As OleDb.OleDbCommand
Dim conDatabase As OleDb.OleDbConnection
'need to determine if this is a new allcation WHERE EmployeeNumber exists in tblTimeAllocation
strSelectNum = _
"SELECT * FROM tblEmployeeAllocation WHERE EmployeeNumber = '" & _
txtEmployeeNumber.Text & "'"
' establish database connection
conDatabase = New OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\devELOPMENT\WINTur\TurN.mdb")
cmdDatabase = New OleDb.OleDbCommand(strSelectNum, conDatabase)
dsEmployeeTime = New DataSet
sda = New OleDb.OleDbDataAdapter
sda.SelectCommand = cmdDatabase
sda.Fill(dsEmployeeTime)
'Try
Dim recEmployee As DataRow = dsEmployeeTime.Tables(0).Rows(0)
If recEmployee.IsNull("EmployeeNumber") Then
bNewTimeAllocation = True
Else
bNewTimeAllocation = False
End If
'Catch exc As IndexOutOfRangeException
' End Try
End Sub
ID EmpNumb TimeAllocationCode
1 88024 880242008020039
2 20410 204102008020039
3 25711 257112008020054
4 34873 348732008020015
5 200920 2009202008020041
6 91272 912722008020022
7 62062 620622008020050
8 63474 63474200802002
9 24277 242772008020026
12 771214 7712142008020040
13 773115 7731152008020030
14 200866 200866200802009
|
|
|
|
|
IvanIT wrote: strSelectNum = _
"SELECT * FROM tblEmployeeAllocation WHERE EmployeeNumber = '" & _
txtEmployeeNumber.Text & "'"
Your query didn't return any results. Probably because you're looking for a String, representing an EmpNumb, which might be a numeric value. A string containing a number is never going to be the same as the number itself.
Try changing the code above to read:
strSelectNum = "SELECT * FROM tblEmployeeAllocation WHERE EmployeeNumber = " & txtEmployeeNumber.Text
|
|
|
|
|
Dave,
Thanks for your input. I took your advice and I got a datatype mismatch error. This is stumping me because I have used this snip of code elsewhere before and it worked like a charm.
|
|
|
|
|
Well, without seeing the code and the line that the error occured on, it's pretty impossible to tell you what's going wrong.
|
|
|
|