I am working on a project where HTML code is being generated to display graphs generated by Google's visualization API. So when the page loads it creates an HTML snippet that has the HTML code to display the graphs. What I would like to do is take this raw HTML code and load it into an iframe so it can be displayed on the page. In .NET is there a way to fill an iframe on button click with raw HTML code?
VB CODE:
public html as String
Sub Page_Load(Src As Object, E As EventArgs)
Dim htmlHeader As String = "<!DOCTYPE html PUBLIC " & Chr(34) & "-//W3C//DTD XHTML 1.0 Transitional//EN" & Chr(34) & "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & Chr(34) & "><html xmlns=" & Chr(34) & "http://www.w3.org/1999/xhtml" & Chr(34) & "><head><meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & " content=" & Chr(34) & "text/html; charset=utf-8" & Chr(34) & " /><title>Test</title>" & Chr(60) & "script type = " & Chr(34) & "text/javascript" & Chr(34) & " src = " & Chr(34) & "http://canvg.googlecode.com/svn/trunk/canvg.js" & Chr(34) & ">" & Chr(60) & "/script>" & Chr(60) & "script type = " & Chr(34) & "text/javascript" & Chr(34) & " src = " & Chr(34) & "http://canvg.googlecode.com/svn/trunk/rgbcolor.js" & Chr(34) & ">" & Chr(60) & "/script></head><body>"
Dim htmlFooter As String = Chr(60) & "div>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart1_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart2_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart3_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart4_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart5_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "div style=" & Chr(34) & "clear:both" & Chr(34) & ">" & Chr(60) & "/div></div></body></html>"
Dim htmlChartheader As String = Chr(60) & "script src=" & Chr(34) & "https://www.google.com/jsapi" & Chr(34) & " type=" & Chr(34) & "text/javascript" & Chr(34) & ">" & Chr(60) & "/script>" & Chr(60) & "script type=" & Chr(34) & "text/javascript" & Chr(34) & "> /*CACHARTS*/ google.load(" & Chr(34) & "visualization" & Chr(34) & ", " & Chr(34) & "1" & Chr(34) & ", {packages:[" & Chr(34) & "corechart" & Chr(34) & "]}); google.setOnLoadCallback(drawChart); function drawChart() { var data; var chart;"
Dim htmlChartfooter As String = " window.scroll(0,0); } " & Chr(60) & "/script>"
Dim htmlChart1 As String = ""
Dim htmlChart2 As String = ""
Dim htmlChart3 As String = ""
Dim htmlChart4 As String = ""
Dim htmlChart5 As String = ""
Dim dataPoints As String = ""
Dim qCount As Integer = 0
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q1" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "141000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q2" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "151000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q3" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "161000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q4" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "145000" & ");"
htmlChart1 = "document.getElementById('chart1_div').scrollIntoView();chartTitle = 'Regular & REO Average Sold Price'; xColumn = 'Quarter'; yColumn = 'Avg Sold Price'; zColumn = 'Smoothed'; yTitle = 'Price in Thousands'; chart = new google.visualization.LineChart(document.getElementById('chart1_div')); legendType = 'none'; data = new google.visualization.DataTable(); data.addColumn('string', xColumn); data.addColumn('number', yColumn); data.addColumn('number', zColumn); data.addRows(10); " & dataPoints & "chart.draw(data, {title: chartTitle ,vAxis:{title: yTitle} ,width: 500, height: 500 ,hAxis:{slantedText:true, slantedTextAngle:90, textStyle:{fontSize:10}} ,curveType:'function' ,lineWidth:1 ,pointSize:1 ,legend:'none' ,legend: legendType }); "
html = htmlHeader & htmlChartheader & htmlChart1 & htmlChartfooter & htmlFooter
textbox1.text = html
End sub
Sub Button1_Click(Byval sender as object,Byval e as EventArgs)
filliFrame(html)
End Sub
Sub filliFrame(htmlcode as String)
This is where I would like to write the HTML to the iFrame
?? iframe.write(htmlcode) ??
End Sub
I was able to accomplish this by storing the html code into a hidden field and using a JavaScript function to push the code to the iFrame.
VB CODE:
Sub Page_Load(Src As Object, E As EventArgs)
Dim html as String = ""
Dim htmlHeader As String = "<!DOCTYPE html PUBLIC " & Chr(34) & "-//W3C//DTD XHTML 1.0 Transitional//EN" & Chr(34) & "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & Chr(34) & "><html xmlns=" & Chr(34) & "http://www.w3.org/1999/xhtml" & Chr(34) & "><head><meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & " content=" & Chr(34) & "text/html; charset=utf-8" & Chr(34) & " /><title>Test</title>" & Chr(60) & "script type = " & Chr(34) & "text/javascript" & Chr(34) & " src = " & Chr(34) & "http://canvg.googlecode.com/svn/trunk/canvg.js" & Chr(34) & ">" & Chr(60) & "/script>" & Chr(60) & "script type = " & Chr(34) & "text/javascript" & Chr(34) & " src = " & Chr(34) & "http://canvg.googlecode.com/svn/trunk/rgbcolor.js" & Chr(34) & ">" & Chr(60) & "/script></head><body>"
Dim htmlFooter As String = Chr(60) & "div>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart1_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart2_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart3_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart4_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "span class=" & Chr(34) & "float-left" & Chr(34) & " id=" & Chr(34) & "chart5_div" & Chr(34) & ">" & Chr(60) & "/span>" & Chr(60) & "div style=" & Chr(34) & "clear:both" & Chr(34) & ">" & Chr(60) & "/div></div></body></html>"
Dim htmlChartheader As String = Chr(60) & "script src=" & Chr(34) & "https://www.google.com/jsapi" & Chr(34) & " type=" & Chr(34) & "text/javascript" & Chr(34) & ">" & Chr(60) & "/script>" & Chr(60) & "script type=" & Chr(34) & "text/javascript" & Chr(34) & "> /*CACHARTS*/ google.load(" & Chr(34) & "visualization" & Chr(34) & ", " & Chr(34) & "1" & Chr(34) & ", {packages:[" & Chr(34) & "corechart" & Chr(34) & "]}); google.setOnLoadCallback(drawChart); function drawChart() { var data; var chart;"
Dim htmlChartfooter As String = " window.scroll(0,0); } " & Chr(60) & "/script>"
Dim htmlChart1 As String = ""
Dim dataPoints As String = ""
Dim qCount As Integer = 0
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q1" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "141000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q2" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "151000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q3" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "161000" & "); "
qCount += 1
dataPoints += "data.setValue(" & qCount & ",0,'" & "Q4" & "'); "
dataPoints += "data.setValue(" & qCount & ",1," & "145000" & ");"
htmlChart1 = "document.getElementById('chart1_div').scrollIntoView();chartTitle = 'Regular & REO Average Sold Price'; xColumn = 'Quarter'; yColumn = 'Avg Sold Price'; zColumn = 'Smoothed'; yTitle = 'Price in Thousands'; chart = new google.visualization.LineChart(document.getElementById('chart1_div')); legendType = 'none'; data = new google.visualization.DataTable(); data.addColumn('string', xColumn); data.addColumn('number', yColumn); data.addColumn('number', zColumn); data.addRows(10); " & dataPoints & "chart.draw(data, {title: chartTitle ,vAxis:{title: yTitle} ,width: 500, height: 500 ,hAxis:{slantedText:true, slantedTextAngle:90, textStyle:{fontSize:10}} ,curveType:'function' ,lineWidth:1 ,pointSize:1 ,legend:'none' ,legend: legendType }); "
html = htmlHeader & htmlChartheader & htmlChart1 & htmlChartfooter & htmlFooter
lblhtmlholder.text = html
End sub
Sub Button1_Click(Byval sender as object,Byval e as EventArgs)
hdnTextbox1.Value = lblhtmlholder.text
filliFrame()
End Sub
Sub filliFrame()
Page.ClientScript.RegisterStartupScript(Me.GetType(), "myKey", "injectHTML();", True)
End Sub
HTML CODE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type = "text/javascript" src = "//canvg.googlecode.com/svn/trunk/canvg.js"></script>
<script type = "text/javascript" src = "//canvg.googlecode.com/svn/trunk/rgbcolor.js"></script>
<script type = "text/javascript">
function injectHTML(){
//step 1: get the DOM object of the iframe.
var iframe = document.getElementById('iFrame1');
var html_string = document.getElementById("hdnTextbox1").value
document.getElementById("hdnTextbox1").value = ""
try{
//step 2: obtain the document associated with the iframe tag
//most of the browser supports .document. Some supports (such as the NetScape series) .contentDocumet, while some (e.g. IE5/6) supports .contentWindow.document
//we try to read whatever that exists.
var iframedoc = iframe.document;
if (iframe.contentDocument)
iframedoc = iframe.contentDocument;
else if (iframe.contentWindow)
iframedoc = iframe.contentWindow.document;
if (iframedoc){
// Put the content in the iframe
iframedoc.open();
iframedoc.writeln(html_string);
iframedoc.close();
} else {
//just in case of browsers that don't support the above 3 properties.
alert('Cannot inject dynamic contents into iframe.');
}
}
catch(err)
{
alert(err.message);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:label id="lblHtmlHolder" runat="server" visible="false" />
<input type="hidden" id="hdnTextbox1" runat="server" />
<input type="hidden" id="hdnChart1" runat="server" />
<asp:Button ID="button1" runat="server" Text="Fill iFrame" OnClick="Button1_Click" />
<iframe id="iFrame1" runat="server" style="width:700px; height:400px;" />
</form>
</body>
</html>
Related
How can i put some design in my HTML code inside the vb.net code?
I want to change the font design inside my body tag as the text in my body tag will send in users email address. Your help will greatly appreciated.
here's my code:
mail.Subject = "SYSTEM REQUEST FORM " & txtRequestTitle.Text & " " & Format(Now(), "MM/dd/yyyy").ToString
mail.IsBodyHtml = True
mail.Body = "<html>" & _
"<body>" & _
"Dear " & DropDownApprover.Text & ",<br><br>" & _
"" & "The following request has been created and need your approval" & "<br>" & _
"" & "===============================================" & "<br>" & _
"" & "http://10.190.193.162/ITrequestform/LoginPage.aspx" & "<br>" & _
"" & "===============================================" & "<br>" & _
"" & "Requested By: " & lblName.Text & "<br>" & _
"" & "Need to Approve By: " & DropDownApprover.Text & "<br>" & _
"" & "===============================================" & "<br>" & _
"" & "Request Title: " & txtRequestTitle.Text & "<br>" & _
"" & "Request Category: " & DropDownCateg.Text & "<br>" & _
"" & "Request Item: " & DropDownCateg2.Text & "<br>" & _
"" & "Date Needed: " & txtDateNeeded.Text & "<br>" & _
"" & "===============================================" & "<br>" & _
"" & "For Employee: " & txtRequestEmp.Text & "<br>" & _
"" & "Position: " & txtEmpPost.Text & "<br>" & _
"" & "Description of Request: " & txtDescription.Text & "<br>" & _
"" & "Justification of Request: " & txtJustification.Text & "<br>" & _
"" & "<br>" & _
"Thanks," & "<br>" & _
"HKT Teleservices""<br>" & _
"</body>" & _
"</html>"
Add CSS in project:
In SolutionExplorer --> Right click o project --> Add existing item and select Stylesheet(CSS).
Use CSS in ASPX page:
You need to add refererence for this CSS file in ASPX page
<link href="Stylesheet.css" rel="stylesheet" type="text/css" />
Any style you want to apply to your body text you can write in the code below
And in the Stylesheet.css file, , write this code
body{
font-family:"Helvetica Neue" , "Lucida Grande" , "Segoe UI";
font-size:20px;
}
i have this code from a shipping website. I can submit to the gateway like any other carrier however they don't have a formatted xml example. They gave this example I wanted to know how to convert it to a properly formatted xml.
curl -X POST \
https://api.rocketship.it/v1 \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_RS_API_KEY' \
-d '{
"carrier": "UPS",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"tracking_number": "1Z12345E0205271688"
}
}'
I just need the tags like submitting to fedex or ups. This is what i submit to transpak. It has the xml and xmlhttp code to submit it.
XMLRequest1 = "<?xml version='1.0' encoding='utf-8'?>" & _
"<soap:Envelope xmlns:xsi=" & Chr(34) & "http://www.w3.org/2001/XMLSchema-
instance" & Chr(34) & " xmlns:xsd=" & Chr(34) &
"http://www.w3.org/2001/XMLSchema" & Chr(34) & " xmlns:soap=" & Chr(34) &
"http://schemas.xmlsoap.org/soap/envelope/" & Chr(34) & ">" & _
"<soap:Body>" & "<ShipmentInquiry xmlns=" & Chr(34) & "http://tempuri.org/"
& Chr(34) & ">" & "<Housebill>" & trackingNumber & "</Housebill>" & _
"</ShipmentInquiry>" & "</soap:Body>" & "</soap:Envelope>"
That is teh xml that I need to submit to the example I gave above. I need it formatted similarly.
XML_Method = "POST"
XML_Track_URL = "http://freight.transpak.com/WTKServices/Shipments.asmx"
On Error GoTo 0
TrackTRANSPACK = "Test" ' default if not supported or not tracked by request
Set XMLHTTP = CreateObject("Microsoft.xmlhttp")
XMLHTTP.Open XML_Method, XML_Track_URL, False
'xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
XMLHTTP.send XML_Request1 ' okay to send blank string, if not needed (non-UPS tracking)
TrackTRANSPACK = CStr(XMLHTTP.responseText)
Any help would be appreciated.
I needed to submit a json string to get a json response.
XML_Request1 = "{" & Chr(34) & "carrier" & Chr(34) & ": " & Chr(34) &
"fedex" & Chr(34) & "," & Chr(34) & "type" & Chr(34) & ": " & Chr(34) &
"TRACKING_NUMBER_OR_DOORTAG" & Chr(34) & "," & _
Chr(34) & "action" & Chr(34) & ": " & Chr(34) & "track" & Chr(34) & "," &
Chr(34) & "parameters" & Chr(34) & ": {" & Chr(34) & "key" & Chr(34) & ": "
& Chr(34) & "key" & Chr(34) & "," & _
Chr(34) & "password" & Chr(34) & ": " & Chr(34) & "password" & Chr(34) & ","
& Chr(34) & "meterNumber" & Chr(34) & ": " & Chr(34) & "meter number" &
Chr(34) & "," & _
Chr(34) & "accountNumber" & Chr(34) & ": " & Chr(34) & "account" & Chr(34) &
"," & Chr(34) & "service" & Chr(34) & ": " & Chr(34) &
"GROUND_HOME_DELIVERY" & Chr(34) & "," & _
Chr(34) & "tracking_number" & Chr(34) & ": " & Chr(34) & trackingNumber &
Chr(34) & "}}"
I went to a json online formatter to put together the proper string:
{
"carrier": "fedex",
"type": "TRACKING_NUMBER_OR_DOORTAG",
"action": "track",
"parameters": {
"key": "YOURKEY",
"password": "YOURPASS",
"meterNumber": "YOURMETER",
"accountNumber": "510087348",
"service": "GROUND_HOME_DELIVERY",
"tracking_number": "."
}
}
I submitted the payload and got a valid response.
I'm trying to create a vba code to append some data to a Table named T_Tickets
Below the code I'm using.
Function addticketScheduleChange()
Dim route As String
route = InputBox("Please enter the URL for the ticket:", "Schedule Review")
Set db = CurrentDb
Dim frm As Form
Set frm = Form_Frm_View_Team
sSQL = "Insert INTO T_Tickets ([CSA Login],[Team Manager],[Schedule Description],[WF Shift Pattern],[Mytime Schedule Description],[Shift Pattern Description],[Mytime Description Code],[Type of Ticket],[Resolved?],[Date Submited],[Ticket Link])" _
& "Select " _
& "frm.[CSA Login]" & ", " _
& "frm.[Team Manager]" & ", " _
& "frm.[Schedule Description]" & ", " _
& "frm.[CSSM SPD]" & ", " _
& "frm.[Mytime Descrription]" & ", " _
& "frm.[Shift Pattern Descr]" & ", " _
& "frm.[MytimeDescriptionCode]" & ", " _
& "'Schedule Change'" & ", " _
& False & ", " _
& "Now()" & ", " _
& "route"
db.Execute sSQL
MsgBox ("Record saved.")
End Function
Any help is appreciated.
Try this:
sSQL = "Insert INTO T_Tickets ([CSA Login],[Team Manager],[Schedule Description],[WF Shift Pattern],[Mytime Schedule Description],[Shift Pattern Description],[Mytime Description Code],[Type of Ticket],[Resolved?],[Date Submited],[Ticket Link]) " _
& "Values (" _
& "'" & frm.[CSA Login] & "'," _
& "'" & frm.[Team Manager] & "'," _
& "'" & frm.[Schedule Description] & "'," _
& "'" & frm.[CSSM SPD] & "'," _
& "'" & frm.[Mytime Descrription] & "'," _
& "'" & frm.[Shift Pattern Descr] & "'," _
& "'" & frm.[MytimeDescriptionCode] & "'," _
& "'Schedule Change'," _
& " False, " _
& " Now(), " _
& "'" & route & "')"
So I'm trying to use ScriptGUI (from here) for my .bat files, but it doesn't have a file selector, so I attempted to add one.
I just copied and renamed some code around and it seems to work, apart from adding another variable for the subfunction thing.
' build a file selector
ElseIf UCase(strSplit(0)) = "FILE" Then
strHTML = strHTML & Build_File(strLabel,id,Replace(strLabel," ",""),strSplit(2))
' store the batch file in the arrControls array
arrControls(id) = "file,none"
id = id + 1
>
the problem seems to be the code under here "Click_File(" & fiId & "," & fiFilter & ")"
Function Build_File(fiLabel, fiId, fiName, fiFilter)
' Construct a file selector
Dim strHTML
strHTML = "<input class='button' type='button' name='" _
& fiName & "' value='" & fiLabel & "' id='" & fiId _
& "' onClick=" & chr(34) & "Click_File(" & fiId & "," & fiFilter & ")" & chr(34) _
& " onMouseOver=" & chr(34) & fiName & ".className='button btnhov'" & chr(34) _
& " onMouseOut=" & chr(34) & fiName & ".className='button'" & chr(34) _
& ">"
strHTML = strHTML & " <input type='text' readonly='readonly' value='none' name='fi" & fiName & "' id='fi" & fiId & "'/> "
Build_File = strHTML
End Function
>
Sub Click_File(strId, fiFilter)
' open a file selector
set objShell= CreateObject("WSCript.Shell")
myCur = objShell.CurrentDirectory
Dim file
file = GetFileName(myCur, fiFilter)
arrControls(strId) = "file," & file
document.getElementById("fi" & strId).value = file
document.getElementById("fi" & strId).size = Len(file) + 2
End Sub
It tells me I can't use parenthesis when calling a sub.
Any ideas?
EDIT: new problem,
I'm using a script from Rob van der Woude for the open file dialog (top post from here) which is apparently supposed to work in hta but I get an error saying "ActiveX component can't create object: 'UserAccounts.CommonDialog'"
Well, the message isn't wrong. You can't use parentheses when calling a Sub.
Change this line from:
& "' onClick=" & chr(34) & "Click_File(" & fiId & "," & fiFilter & ")" & chr(34) _
to:
& "' onClick=" & chr(34) & "Click_File " & fiId & "," & fiFilter & chr(34) _
and see if that solves your problem.
I wrote this code but I got "Run time error '91':"
Private Sub Command1_Click()
Set rs = New ADODB.Recordset
openConnection
If Me.cmbMonth = "" And Me.cmbYear = "" Then
MsgBox "Please select MONTH and YEAR"
Exit Sub
End If
With crystalrpt
.ReportFileName = App.Path & "\Report\VariableReport.rpt" <-- ERROR IS HERE
.SelectionFormula = "{SW.dtaMonth}='" & cmbMonth.Text & "' and {SW.dtaYear}=" & dtaYear.Text & "" & _
" and {SFW.dtaMonth}='" & cmbMonth.Text & "' and {SFW.dtaYear}=" & dtaYear.Text & "" & _
" and {OT.dtaMonth}='" & cmbMonth.Text & "' and {OT.dtaYear}=" & dtaYear.Text & "" & _
" and {CL.dtaMonth}='" & cmbMonth.Text & "' and {CL.dtaYear}=" & dtaYear.Text & "" & _
" and {RM.dtaMonth}='" & cmbMonth.Text & "' and {RM.dtaYear}=" & dtaYear.Text & "" & _
" and {EL.dtaMonth}='" & cmbMonth.Text & "' and {EL.dtaYear}=" & dtaYear.Text & "" & _
" and {TRANS.dtaMonth}='" & cmbMonth.Text & "' and {TRANS.dtaYear}=" & dtaYear.Text & "" & _
" and {WD.dtaMonth}='" & cmbMonth.Text & "' and {WD.dtaYear}=" & dtaYear.Text & "" & _
" and {MP.dtaMonth}='" & cmbMonth.Text & "' and {MP.dtaYear}=" & dtaYear.Text & "" & _
" and {NONSTOCK.dtaMonth}='" & cmbMonth.Text & "' and {NONSTOCK.dtaYear}=" & dtaYear.Text & "" & _
" and {PACK.dtaMonth}='" & cmbMonth.Text & "' and {PACK.dtaYear}=" & dtaYear.Text & ""
.WindowTitle = "Report"
.Action = 1 'Will Show The Report
End With
End Sub
It's possible that you are trying to create an instance of a class (an object) from a class that is present on the machines you tested it on, but not on the machine it's been deployed to..... for example, I happen to know that I can make a VB program utilize a class for Nero Burning Rom.... I can make a nero object, and use it's methods and properties...... but that will only work on machines that have the Nero libraries installed. If it's not installed, when you try to make the object (either through early or late bindings with new or createobject), the variable that SHOULD refer to the object is still set to Nothing, because the library failed to create an instance of the requested class.....