|
ElseIf optSuppOrder.Value = True Then
Load deMain
With deMain
.SupplierOrderAudit_Grouping txtUser.Text, CDate(Text5.Text), CDate(Text6.Text)
End With
SupplierOrderAudit.Refresh
If SupplierOrderAudit.Visible = False Then
SupplierOrderAudit.Show
End If
End If
if the above option button is chosen, the intended purpose is that the report is generated. However, occasionally, when the command button is pressed, it throws the above run time error pointing to the report line, why is this? any help would be greatly appreciated or if you need any additional info.
|
|
|
|
|
Just plucking at straws but the error may occur if deMain is already loaded (e.g. not unloaded properly from a previous report???).
Maybe you should look into creating a new instance of deMain each time you need a report....
If this isn't where you are receiving the errors thenignore my post
Rhys Kirk
|
|
|
|
|
The error you mention generally occurrs when attempting to open an ADODB.Recordset object when it's already open - if you're reporting from a DB, this will prob be the cause, but suspect that it won't be in your code? Does that help?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
dear all,
1) how do i trap the double click event on an item in a list view control (style = details)
2) how do i make Xp style tool tips (i.e. tool tip with cancel button in the top right corner)
thanx in adv
|
|
|
|
|
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.
|
|
|
|
|
Hi,
Is it possible to programatically access a Folder Properties...for example, A Folder can be shared on the network by right-clicking on it and going to the Sharing Tab. I want to be able to programmatically change/alter all options on the Sharing tab without right-clicking etc.
I am yet to find any articles or sample that can do this so any help would be greatly appreciated.
Many Thanks,
Rhys.
Rhys Kirk
|
|
|
|
|
Hi,
Can you suggest me a good book in Crystal Reports to be used with VB 6. I should know how to generate good reports by passing parameters,selection formula from vb.Also the book should give me a fair idea about subreports and linked
parameters.Can u suggest a good reference book or
anything.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Hi, Everyone,
I would like to encrypt .asp and .jpg files on CD. Does anyone know how to do it/
Thanks
qBAO
qBAO
|
|
|
|
|
Hi everyone i'm new to this VB.NET... i got a project to do and im stuck. it sounds simple but... here goes...
i need to assign a value($) to cities in a dropbox. then if they'er students you get a discount and if your going one way they get a discount. then print a total... i got the design already but i have no clue how to get the values in ... please help.....
thanks
sundragon
|
|
|
|
|
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")
|
|
|
|
|
Dim checkSQL As String
checkSQL = "SELECT OrderGenerate.OrderNumber, Client.Company, OrderGenerate.Completed " & _
" FROM Client INNER JOIN OrderGenerate ON Client.ClientCode = OrderGenerate.ClientCode " & _
" WHERE OrderGenerate.OrderDate= #" & dDate & "#"
Set RS = Conn.Execute(checkSQL)
If RS.BOF And RS.EOF Then
MsgBox "No orders yet today", vbExclamation, "No records returned"
Unload Me
Exit Sub
End If
The above is code that is located at the form load of the form. if no records are returned from the SQL statement, i wish the message box to be displayed and the form to be unloaded, however on run time, it crashes "object was unloaded" - is there anything i can do to fix this? any help would be greatly appreciated!
|
|
|
|
|
try this and let me know
<br />
If RS.BOF And RS.EOF Then<br />
MsgBox "No orders yet today", vbExclamation, "No records returned"<br />
Conn.Close<br />
rs.Close<br />
Set Conn=Nothing<br />
Set rs=Nothing<br />
Unload Me<br />
Exit Sub<br />
End If<br />
|
|
|
|
|
I apologise that this may be documented already but i wish to create help files for my VB project. AT first i was looking at HTML help files and i looked up all the documentation on this. However, i heard that it is possible to create help files from VB without the need to download anything. is this possilbe? if so, where would i find information or instructions regarding it? Any help would be greatly appreciated!
|
|
|
|
|
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
|
|
|
|
|
I am trying to get the Data Environment to print to a Data Report
When calling the Data Report the Data Report appears but I get this error message
"Invalid SQL statement; expect 'Delete', 'Insert', 'Procedure'," etc
My code to call the Data Report is:
Clothing.Commands("Garment").CommandText = " & Text1.text & "
GarPrint.Show
My SQL Statement in the Data Environment is
SELECT ID, CustomerCode, StyleNumber, GarmentDispcrip, ScreenPrint, SizeRange, Embrod, FabricColour, FabricType
Can anyone offer any suggestions please |
bruceb
|
|
|
|
|
SELECT ID, CustomerCode, StyleNumber, GarmentDispcrip, ScreenPrint, SizeRange, Embrod, FabricColour, FabricType
you did not supply the FROM <table_name> part of the query
should be :
Select col1,col2,col3 from table_name
|
|
|
|
|
Thanks I tried that and get a new message
'Failed getting Rowset(s)from current data source'
One step closer but still no joy
|
|
|
|
|
Hello,
I am inserting a Recordset using a SQL statement, but when I call Open(), none of the Recordset Events fire (WillChangeRecordset, RecordsetChangeComplete, etc.). If I use the same Recordset with the same connection but change the Source to a new SQL statement, and call Open() again - all the Events fire.
Public WithEvents rs As ADODB.Recordset<br />
<br />
'conn is a valid ADO connection<br />
conn.Open<br />
<br />
'MySql is a valid insert command independently tested<br />
'The database is updated with the new record, but no Events fire<br />
rs.Open MySql, conn, , , adCmdText<br />
<br />
'Set new valid SQL <br />
rs.Source = "SELECT MyTable.ID from MyTable WHERE ID = 5"<br />
<br />
'Opening this fires all the Recordset Events<br />
rs.Open , , , , adCmdText<br />
<br />
rs.Close
Any ideas why the first Open() fires no events and the second fires all the events?
Thanks is Advance!
Derek
|
|
|
|
|
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
|
|
|
|
|
to delete a row in a datagrid, i highlight the row and press a delete command button. this also works if i highlight the row and press delete on the keyboard. However, now i wish to perform calculations on the click of the delete command button. if delete on the keyboard is pressed, is there anyway to call the delete procedure? Thanks in advance!
|
|
|
|
|
If I'm following you correctly, what you're wanting to do is capture the delete keypress for the datagrid. The only useful way I've found for doing this is to inherit your own datagrid and then override PreProcessMessage to check for the delete key. I use this to confirm deletion before actually carrying it out. The class looks something like this:
<br />
Public Class DataGridConfirm<br />
<blockquote> Inherits DataGrid<br />
<br />
Public Overrides Function PreProcessMessage(ByRef msg As System.Windows.Forms.Message) As Boolean<br />
<blockquote>Dim keyCode As Keys = CType((msg.WParam.ToInt32 And Keys.KeyCode), Keys)<br />
<br />
' If this is a "KeyDown" message and the key pressed was "Delete"<br />
' then we need to verify that the user actually wants to delete <br />
' the record by presenting a messagebox<br />
' Win32.Msg.WM_KEYDOWN just points to an Enum: WM_KEYDOWN=&H100<br />
If msg.Msg = Win32.Msg.WM_KEYDOWN And keyCode = Keys.Delete Then<br />
<blockquote>If ((MessageBox.Show("Are you sure you want to delete?", "AppTitle", _<br />
MessageBoxButtons.YesNo)) = DialogResult.No) Then<br />
<br />
' They've selected no, so simply return<br />
Return True<br />
<br />
End If</blockquote><br />
End If<br />
<br />
' If the user has not canceled the request, flow into the normal<br />
' message processing of the base control<br />
Return MyBase.PreProcessMessage(msg)</blockquote><br />
End Function<br />
</blockquote><br />
End Class<br />
After creating this class, just substitute it for the regular DataGrid your currently using.
Hope that helps!
|
|
|
|
|
hello :
I am new to vb.net and I am trying to get a specific row in a data view based on a user choice of one of my app. combo boxs here is my code
blocked_emp_view.Table = DataSet11.Tables("EMPLOYEE_BLOCKING")
Dim EmPCriteria As String
If Sender = 1 Then
EmPCriteria = CType(ComboBox2.Items(ComboBox2.SelectedIndex), DataRowView).Row.ItemArray(0)
Else
EmPCriteria = CType(ComboBox2.Items(ComboBox3.SelectedIndex), DataRowView).Row.ItemArray(0)
End If
DataSet11.Tables("EMPLOYEE_BLOCKING").DefaultView.RowFilter = "EMP_NO =" & EmPCriteria
blocked_emp_view.Sort = ("BLOCKING_DATE DESC")
blocked_emp_view.RowFilter = "EMP_NO ='" & EmPCriteria & "'"
I keep getting the same record each time although I change my selection any idea what is wrongthanks
Dalia
|
|
|
|
|
uSQL = "Insert Into OrderDetails2 (OrderNumber, ProductCode, ProductDesc, Quantity, UnitPrice, FullPrice)
Values (" & iOrderNo & ", '" & strCode & "', '" & strDesc & "', " & iQuantity & "," & iPrice & ", " & iFullPrice & ")"
Set RS = Conn.Execute(uSQL)
'MsgBox ("Adding record to the datagrid")
'refreshing the datagrid based on new info
RS.Requery
Me.Adodc3.Refresh
Me.DataGrid2.Refresh
the above is code for adding data to a datagrid. the Adodc3's recordset is the table OrderDetails2 and the datasource of the datagrid is Adodc3. However, when executed, it throws the above error - i have run the code many times before and it has never thrown this error. what is the problem? if it is referring to the RS, how do i open this to stop the error occurring?
|
|
|
|
|
this mat be the problem
Set RS = Conn.Execute(uSQL)
you need to call Conn.Open
|
|
|
|
|
Visual Studio.NET, when I make a program installer, uses NETSTREAM (which was Company name when XP and VS.NET were installed).
Company name has changed, but I can't find where to change this setting in VS.NET
Anyone help?
|
|
|
|