when I run my project then a msg was shown:
"object doesn't support this property or method"
but when I press ok then the project run. no problem occurred.
Now what I need to do?
when I run my project then a msg was shown:
"object doesn't support this property or method"
but when I press ok then the project run. no problem occurred.
Now what I need to do?
ya its come from another computer. in this thread what kind of control I missing, can you tell?
not like that. like :
Private Sub Form_Load()
Dim x As Integer
x = 100
Label4.Caption = x
End Sub
When I open a project in vb6 then show a msg: and tell me to see a log file. and the description of log file is below:
Line 29: Class b8Controls4.b8Line of control b8LLogoB was not a loaded control class.
Line 116: Class b8Controls4.b8ClientWin of control b8CW was not a loaded control class.
Now what I should be do?
I use it but my problem not solve with this.
in my database I enter three item in 'Item' field. paper, pen, pencil. in my vb project i have three text box. here I want these three item show in this three text box. how it possible.
Private Sub Form_Load()
Call con
'Fill The Combo box
While rs.EOF <> True
Combo1.AddItem rs!field
rs.MoveNext
DoEvents 'Add this code so that the system will not freeze...
Wend
Combo1.Enabled = False
End Sub
Public Sub con()
'Open The Connection
cn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Jet OLEDB:Database Password=;")
'Open The Recordset
rs.Open "SELECT * FROM Table1", cn, adOpenStatic, adLockOptimistic
End Sub
you can use google search.
what kind of tools you want to make?
data report.
please then......
in my project man can entry their income or expenses. like: paper sale, pencil sale etc. they entry it like: paper $200.00, pencil $100.00. they also made a group or category. here they entry paper and pencil under 'sales' group. so every thing depend on user. here I want the report show 'sales = $300.00'. cause this is the total sum of paper and pencil. but I don't know the group what? so how it possible to make report of the various group's sum will show with group name.
some data entry in some field. like:
ID name amount
01 taher 100
02 kamal 200
01 taher 500
I don't know what data entry in field. in my vb project i have some textbox. I want one textbox show the Id: 01 and other text box show the (total of id 01) amount: 600. like:
ID amount
01 600
other textbox show the total amount of id 02 and then id 03.........
how I do It.
you start this thread before. 1stly stop that thread. and then start it with more details.
not clear, please say clearly.
what kind of code you want to know? to connect with report and connect with various control of report with backend database. please details.
try this.
I don't know no more. But I use it many time it in my pc. few day ago it act like you. so I took a fresh new copy of it and install windows again and then install this sql server. nw its ok.
from file menu click 'make project exe'. type the name what you choose. you see the option button for more.
how you use it in design mode?
thanks. actually I want to do different. so if you are don't mind then I can say it.
Text2(0).Text = Rs.Fields("TheSum") 'instead of above AS [Total of Category]
I don't understand this line.
or you could use recordset navigation buttons (movefirst, moveprevious, movenext, movelast) Or you could use a grid of some sorts to populate the data.
I think If I use this then it show one row. but I want total.
Me.Width = Screen.ScaleWidth
Me.Height = Screen.ScaleHeight
Me.WindowState = vbMaximizedGood Luck
this not run. I write this and run
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.WindowState = vbMaximized
nice . but I want to know another thing. here the category show in row. then how I show it in two text box in vb6. I mean the total sum of maintenance and stationery in show in two text box.
no change. the maximized button of the form was true when it run. but the form size not change. I mean it not show in full screen. it show in half of the screen with maximized button true. when I click maximized button it false and then again click then true and show in full screen.
I made a cross tab query. please see the attach file. the sum of category show in textbox in my project. like:
Stationary = 2000.00
Machinery = 5000.00
Salary = 2200.00
here I can write sql command like:
select sum(stationery) from table1
but here I know the category"stationery" so I write it. but the category will be various. that I don't know what. so how will be the sql command here, that show the sum of category.
my form window sate (property) is maximized. this is run maximized before. but today it run normally. but when I manually maximized it then it would maximized. what problem with it.
why i have to declare?
I just give u a example. paste your code.
not that. you declare it in general declaration. or you use module.
sorry. its not match with your thread. I understood wrong.
type mismatch. its not match with your type. example: you work with some numeric number. you declare a variable Like
Dim a as string
so it show this msg. type mismatch. cause string value is not match with your work. you need to declare like:
Dim a as Integer
cause integer is for numeric value. same as other. here you not mention what you did. But I think it solve your problem.
whole thing I don't understand. please explain.
you must reconnect it
reconnect mean......................
you mean you input a record and it print directly. please use this code: printer.print Text1.text
I saw it many project. vipin's solution is an way to do this.
If you do it by vb with a textbox
Function GetId(TableName As String, FieldName As String, Optional Criteria As String)
Dim rs As New ADODB.Recordset
If Criteria = "" Then
rs.Open "Select max(" & FieldName & ") from " & TableName, conn, adOpenDynamic, adLockReadOnly
GetId = IIf(IsNull(rs.Fields(0)), 0, rs.Fields(0))
Else
rs.Open "Select max(" & FieldName & ") from " & TableName & " where " & Criteria, conn, adOpenDynamic, adLockReadOnly
GetId = IIf(IsNull(rs.Fields(0)), 0, rs.Fields(0))
End If
End Function
Private Sub Txtcourse_LostFocus()
txtcrseid.Text = Val(GetId("table1", "[crseid]", " course_name ='" & Txtcourse.Text & "'")) + 1
End Sub
here course name mean if you have several course name. when you type the course name in txtcourse(textbox) it will increase crseid automatically.
you mean it will possible with check box not with option button.
need more information to know what you want to do?
but when I click another option button then the textbox.enable not false
which procedure I write this code:
option1.value = true then
text1.enable = true
else
text1.enable = false
thanks Mtb 925. it works well. another thing when I input exam fee in a form and when I see the report it not update. I mean exam fee is 200 and I add again 200. so report will show 400/ but it show 200, when I exit and again open the project then show 400. please help me
NOTE:
sum[exam fee] ==> sum([exam fee])
I don't understand by this code. I want sum[exam fee] and sum[other fee]. is it possible with your code?
I tried It many way and then solve. thanks
both are same format. I know like %d . it show the current date in report. but I want it show selected date what selected from dtpicker.
ya that field are numeric.
what kind of project? is it made by language like vb or c++? details.......
I know some function but it show the current date.
another thing. I write like:
"select sum[exam fee] as total , sum[other fee] as total_fee from table1"
it not work
In a data environment I write code like:
select ([exam fee]*[other fee]) as total from table1
then it work, but when I write like below it not work:
select sum[exam fee] as total from table1
what problem with it?