Resource Missing error when importing Form with VBA

Hello everyone!

I'm trying to import a package file created on another machine onto a
couple of my servers.

It's only a single modified form with VBA code, called "UM_
Payment_Entry".

However, every time I try to import the package on the server, I get
the error message
Resource "PrintReceipt" is missing.

Now, "Print Receipt" is defined in the package code....so why isn't
Great Plains finding the resource?

Thanks,
Steven Vallarian


-----------------------payment_entry.package contents----------------

<Component Name="UM_Payment_Entry" ProductId="229" Object="Form" >
= Form	"UM_Payment_Entry"
{
	Datatypes
	{
		Datatype	"PrintReceipt"		
		{
			Control	"PushButton"
			DefaultDown	"00000"
			DefaultMouseOver	"00000"
			DefaultUp	"00000"
			Prompt	"Print"
			PromptDown	""
			PromptMouseOver	""
			StaticType	"Mixed"
			~ItemImages
			{
			}
		}
	}
	Fields
	{
		Field	"PrintReceipt"		
		{
			ArraySize	"0"
			Datatype	"(L) PrintReceipt"
			LookupForm	""
			PhysicalName	""
		}
	}
	Windows
	{
		= Window	"Maint_Window"
		{
			Fields
			{
				= WindowControl	"(L) PrintStat"
				{
					PositionLeft	"150"
					SizeWidth	"126"
				}
				= WindowControl	"(L)
UpdatePenaltyDocRef"
				{
					ZOrder	"148"
				}
				= WindowControl	"(L) WarningMsg"
				{
					ZOrder	"149"
				}
				= WindowControl	"(L)
cbVoidPenaltyOnLastBill"
				{
					ZOrder	"147"
				}
				- WindowLine	"275"
				= WindowLine	"276"
				{
					PositionLeft	"276"
					PositionTop	"4"
					ZOrder	"140"
				}
				= WindowLine	"280"
				{
					ZOrder	"143"
				}
				= WindowPrompt	"283"
				{
					ZOrder	"146"
				}
				= WindowControl	"Post Button"
				{
					PositionLeft	"280"
				}
				= WindowControl	"Print Button"
				{
					PositionLeft	"596"
					PositionTop	"76"
				}
				= WindowControl	"WindowHelp"
				{
					ZOrder	"141"
				}
				= WindowControl	"WindowPrint"
				{
					ZOrder	"142"
				}
				= WindowControl	"Zoom Button"
				{
					ZOrder	"144"
				}
				= WindowControl	"umCustClassID"
				{
					ZOrder	"145"
				}
			}
			LastTag	"10001"
		}
	}
}
</Component>
<Component Name="UM_Payment_Entry" ProductId="229" Object="VBAForm" >
VBAForm	"UM_Payment_Entry"
{
	Windows
	{
		Window	"Maint_Window"		
		{
			Code	"Dim PrintReceipt As Boolean
Dim ReceiptNumber As String


Private Sub Connection()
'declare local variables
Dim TableCount As Integer
Dim i As Integer

'initalize local variables
TableCount = 0
i = 0

'get the number of tables
TableCount = PEGetNTables(CurrentJob)
'loop through all tables in the main report
'and set connection information
For i = 0 To (TableCount - 1)
    'set the table number
    TableNum = i
    'What type of database connection is it?
    result = PEGetNthTableType(CurrentJob, i, TableType)
    If result = 0 Then ErrorTrap (CurrentJob)
    If TableType.DBType = PE_DT_STANDARD Then
        'it's a PC type database, call the PC login window
        frmPCCon.Show 1
    Else
        'it's a SQL type database, call the SQL login window
        frmSQLCon.Show 1
    End If
Next i
End Sub



Private Sub Save_AfterUserChanged()

' this is the ActiveX Code i am working On
'  Dim CrystalReport1 As New CrystalReport
'  CrystalReport1.ReportFileName =
\"c:\\CRWCSA\\MBRSHIPS\\Membership2.rpt\"
'  CrystalReport1.Action = 1
  
  If PrintReceipt = False Then
    Exit Sub
  End If
  
  'initialize the global variables
  Job = 0
  Handle = 0
  TableNum = 0
  TableType.StructSize = PE_SIZEOF_TABLE_TYPE
  CurrentJob = 0
  result = 0
  ErrorNum = 0
  ErrorMsg = \"\"
  TxtHndl = 0
  txtLen = 0

  'open the print engine
  Handle = PEOpenEngine
  If Handle = 0 Then
    ErrorTrap (Handle)
  End If

  'declare local variables
  Dim SubInfo As PESubreportInfo
  Dim WinOptions As PEWindowOptions
  Dim TotalRPTSections As Integer
  Dim RPTSectionCode As Integer
  Dim subnum As Integer
  Dim SubHandle As Integer
  Dim i As Integer
  Dim ii As Integer

  'initialize variables

  'The following sets the options for the viewer window.
    WinOptions.StructSize = PE_SIZEOF_WINDOW_OPTIONS

    WinOptions.hasGroupTree = 0
    WinOptions.canDrillDown = 0
    WinOptions.hasNavigationControls = 1
    WinOptions.hasCancelButton = 1
    WinOptions.hasPrintButton = 1
    WinOptions.hasExportButton = 1
    WinOptions.hasZoomControl = 1
    WinOptions.hasCloseButton = 1
    WinOptions.hasProgressControls = 1
    WinOptions.hasSearchButton = 0
    WinOptions.hasPrintSetupButton = 1
    WinOptions.hasRefreshButton = 1
    WinOptions.showToolbarTips = 1
    WinOptions.showDocumentTips = 1
    WinOptions.hasLaunchButton = 0

    SubInfo.StructSize = PE_SIZEOF_SUBREPORT_INFO
    TotalRPTSections = 0
    RPTSectionCode = 0
    subnum = 0
    SubHandle = 0
    i = 0
    ii = 0


    'set the main report as the current printjob
    CurrentJob = Job
    'set the connection information for all tables in the main report
    Connection

    'set the connection information for all tables in all subreports
    'Get the total amount of sections in the Main report
    TotalRPTSections = PEGetNSections(Job)
    For i = 0 To (TotalRPTSections - 1)
      'Get the section code for each section in the Main report
      RPTSectionCode = PEGetSectionCode(Job, i)
      'Get the total amount of subreports in the section
      subnum = PEGetNSubreportsInSection(Job, RPTSectionCode)
      'Get the handle of the subreport
      If subnum > 0 Then
        For ii = 0 To (subnum - 1)
          SubHandle = PEGetNthSubreportInSection(Job, RPTSectionCode,
i)
          If SubHandle = 0 Then ErrorTrap (Job)
          result = PEGetSubreportInfo(Job, SubHandle, SubInfo)
          If result = 0 Then ErrorTrap (Job)
          'set CurrentJob
          CurrentJob = PEOpenSubreport(Job, SubInfo.Name)
          If CurrentJob = 0 Then
            ErrorTrap (CurrentJob)
              Else
            Connection
          End If
        Next ii
      End If
    Next i

    'Let the user select the report
    'if there is already a print job open then close it
    If Job > 0 Then
      PEClosePrintJob (Job)
      Job = 0
    End If

    Job = PEOpenPrintJob(\"c:\\CRWCSA\\Deposits\\DepositReceipt.rpt\")
    'if the report won't open, get the error
    If Job = 0 Then
      ErrorTrap (Job)
    End If

    result = PEDiscardSavedData(Job)
    If result = 0 Then ErrorTrap (Job)
    'discard saved data
    PEDiscardSavedData Job

    Dim ParamFieldInfo As PEParameterFieldInfo
    Dim valueInfo As PEValueInfo
    Dim ParamValInfo As PEParameterValueInfo

    ParamFieldInfo.StructSize = PE_SIZEOF_PARAMETER_FIELD_INFO
    valueInfo.StructSize = PE_SIZEOF_VALUE_INFO
    ParamValInfo.StructSize = PE_SIZEOF_PARAMETER_FIELD_INFO

'    NoneSelected = False
 '   For i = 0 To frmMemberships.ListBox1.ListCount - 1
  '    If frmMemberships.ListBox1.Selected(i) Then
        result = PEGetNthParameterField(Job, 0, ParamFieldInfo)
        ParamFieldInfo.CurrentValueSet = True
        ParamFieldInfo.currentValue = ReceiptNumber & Chr$(0)
        result = PESetNthParameterField(Job, 0, ParamFieldInfo)
        NoneSelected = True
   '   End If
    'Next

    'If NoneSelected = False Then
     ' Responce = MsgBox(\"No Membership Was Selected. No Report Will
Be Printed\", vbExclamation & mbOK)
      'Exit Sub
    'End If

'***********************************************************************************
    'Update The Crystal Reports Info to Tell It The Location of The
Tables
    'and The User Name And Password. This will Not Work For User ID =
'SA'
    'I Placed This Code Just Before The 'PEOutputToWindow' Call.

    Dim LogOnInfo As PELogOnInfo
    Dim TableLoc As PETableLocation


    LogOnInfo.StructSize = PE_SIZEOF_LOGON_INFO
    LogOnInfo.ServerName = ConnServer & Chr(0)
    LogOnInfo.DatabaseName = ConnDB & Chr(0)
    LogOnInfo.UserID = ConnUID & Chr(0)
    LogOnInfo.Password = ConnPWD & Chr(0)

    NumberOfTables = PEGetNTables(Job)
    For i = 0 To NumberOfTables - 1
      result = PESetNthTableLogOnInfo(Job, i, LogOnInfo, False)
    Next

'***********************************************************************************

    'set output to window
    result = PESetWindowOptions(Job, WinOptions)
    If result = 0 Then ErrorTrap (Job)
    result = PEOutputToWindow(Job, \"Sample Report\", 0, 0,
scalewidth, scaleheight, 0, 0)
    If result = 0 Then ErrorTrap (Job)
    'start print job

    ' Start Print Job
    result = PEStartPrintJob(Job, False)
    If result = 0 Then
      ErrorTrap (Job)
    End If
End Sub

Private Sub Save_BeforeGotFocus(CancelLogic As Boolean)
  If PaymentEntry.gbxStatements Then
    PrintReceipt = True
    ReceiptNumber = PaymentEntry.Number
      Else
    PrintReceipt = False
  End If
End Sub"
			EventMode	"1"
			Fields
			{
				WindowField	"(L) gbxStatements"
				{
					ArrayIndex	"0"
					DisplayName
"gbxStatements"
					Local	"true"
					ProgrammerName
"gbxStatements"
				}
				WindowField	"Print Button"
				{
					ArrayIndex	"0"
					DisplayName	"Print"
					Local	"false"
					ProgrammerName	"Print Button"
				}
				WindowField	"PrintReceipt"
				{
					ArrayIndex	"0"
					DisplayName	"Print1"
					Local	"false"
					ProgrammerName	"PrintReceipt"
				}
				WindowField	"Save Button"
				{
					ArrayIndex	"0"
					DisplayName	"Save"
					Local	"false"
					ProgrammerName	"Save Button"
				}
				WindowField	"umDocumentNumber"
				{
					ArrayIndex	"0"
					DisplayName	"Number"
					Local	"false"
					ProgrammerName
"umDocumentNumber"
				}
			}
			Title	"PaymentEntry"
		}
	}
}
</Component>


Steven Vallarian, MCSE, IBM CATE
Application Support Specalist
Central Service Association
0
12/1/2004 10:09:43 PM
greatplains 29623 articles. 3 followers. Follow

0 Replies
701 Views

Similar Articles

[PageSpeed] 9

Reply:

Similar Artilces:

resource usage 01-13-10
Hi there, Is it possible to display remaining work in the right hand Pane? I can display it in the left hand pane (the table section) but can't seem to find in the right hand pane (the timephased area). eg. I want total remaining work for each resources for each month Many thanks. -- lk50 ------------------------------------------------------------------------ lk50's Profile: http://forums.techarena.in/members/87282.htm View this thread: http://forums.techarena.in/microsoft-project/1292777.htm http://forums.techarena.in Nope. Remaining work is not a time...

Pivot Table Refresh error "Problems Obtaining Data"
I can't seem to get data or change the data source. When I refresh, I get the error message "Problems Obtaining Data" When I start the Pivot Table Wizard, the back button is grayed out so that I can't go back and change data sources. Any help is appreciated. ...

Assign a range to where the User Form places data
I have a user form with several text boxes and list boxes. I am having difficulties getting the data to be put in the right range. It goes to the next unused line and uses that line, however, there are couple lines at top of spreadsheet, so it uses those, instead of starting on line 4 as I would like. I have tried to select a range in which the lines are to be written, but not getting good results. Undoubtedly there is an easy answer. Thanks in advance for your attention. Hi As always post your macro for comments. Try and see if this can help you: TargetRow=3DRange(...

POP3 account errors
This may be a network problem, not an Outlook problem, but TIA for any suggestions. I have a small home network and am running Outlook 2002 on two different computers. I have a outside POP3 email account. On another computer, I can receive mail via the POP3 account but I cannot send mail. I get the following error message: >>> Your message did not reach some or all of the intended recipients. Subject: test Sent: 12/10/2003 6:44 AM The following recipient(s) could not be reached: 'xxx@hotmail.com' on 12/10/2003 6:44 AM 550 not local host hotmail.com, not a gateway >>> ...

about resources and the using
Hi! GC removes objects when the GC decides so because C# is managed. At the bottom I have a code snipped. The book I read say Always call Dispose() on Pen objects or use the using feature on the Pen object. I mean C# is managed so I can't understand why I should dispose the Pen object. GC should take care of this. The reason is probably that I mixup memory and resources. GC take care of free memory but not resources. I have some problem to understand why I must dispose the Pen object here because I see the Pen object as any object such as a Person or Car. So my first qu...

Missing emails in outlook 2007
In the past 1 1/2 month, my Outlook acting strange. Like last night, when I turned on my notebook and I noticed I got total 47 e-mail. Since, I need to rush out to have dinner with someone, so I let the computer keep on running and do the download mail automatically. But, when I came back. I noticed lot of mails are not in my Outlook's Inbox. So, I went on to Gmail and found about 15 mails not shown on "inbox" but at all mails. This means the mail box considered that these 15 mails already download. This problem is not always happen, I have noticed, as long as I keep using ...

Case Acttivities & Notes Report Error
When I view this reports, all the note records are repeated of the first record on the list. Anyone see the same problem & have a work around? Thanks, ...

MCSD Resource
I have found a resource providing answers for examination questions being helpful in certifying for MCSD.... http://technical-talk.com/mc/mcsd/mcsd.asp ...

Reports, : Some details are missing the Totals,
Hi all, I got a Query "Invoices" that have no Null Value into it. All "TotalItem" are filled by a Decimal, went I print an invoices, the last columns something is missing the data Any of you guys got an ideal ? Regards, Marc ...

Leading Zeros are lost when importing spreadsheet data
I am importing data from an Excel spreadsheet into a .Net DataTable using the following code: // conn string Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties="Excel 8.0" OleDbConnection conn = new OleDbConnection(String.Format(this.ExcelConnString, ofd.FileName)); OleDbCommand cmd = new OleDbCommand(this.SpreadsheetSelect, conn); OleDbDataAdapter da = new OleDbDataAdapter(cmd); DataTable dtAHMOrders = new DataTable(); da.Fill(dtAHMOrders); The data comes across fine except for zip codes with leading zeros in which case the leading zeros are lost. I have tried ...

formula bar missing =
I am used to the formula bar having a SUM = Now using Excel 2002 I only see a fx. Clicking on this opens a window with way too many choices to just click = I have had no luck finding the = sign to customize the tool bar. Is there one? I just want to create a link between two worksheet cells Thanks for any help Not quite the same, but maybe you could drag the = icon to your favorite toolbar (directly above the formula bar). You can get to that = icon via: Tools|customize|Commands Tab|Insert Category. (about half way down for me.) susan wrote: > > I am used to the formula bar hav...

RMS Import into Great Plains
The Microsoft Retail Management System, talks about an Add-on for importing this data into Great Plains. That it's on the Great Plains Side. Can anyone direct me to this Add-on? Is it Downloadable? Does it Cost extra? Let me know... Thanks There is a chunk file you can download from the GPlains site. It allows you to import the journal entries. info@logicalsolutionsllc.com "Scot S" wrote: > The Microsoft Retail Management System, talks about an > Add-on for importing this data into Great Plains. > That it's on the Great Plains Side. > Can anyone direct me t...

Access 2007 Error message printer information
I have Access 2007 running on Vista. Recently, I am receiving this error message when I try to open a report: "There has been a problem retreiving printer information for this object. The object may have been sent to a printer that is unavailable." There is a default printer which is working for other programs. I cannot print the report from Access. When I try to export the report, I get the error message and nothing exports. Thanks for your assistance. -- John ...

Outlook 2003 email content missing, headers ok, HELP!
Running XP Pro and Outlook 2003, AVG and AntiVIR 6.0. Outlook was running fine and then all of a sudden, I'm still getting emails but the content is missing. I can see the header just fine but absolutely blank screen in the body. HELP! Thanks so much! lrunyan <latitudesllc@comcast.net> wrote: > Running XP Pro and Outlook 2003, AVG and AntiVIR 6.0. Outlook was > running fine and then all of a sudden, I'm still getting emails but > the content is missing. I can see the header just fine but absolutely > blank screen in the body. HELP! > Thanks so much! 1) You shou...

How do I set up Data entry to match My Application Form
I have a specific Application Form that I must fill out by hand at each interview. I have created the form in Excel to allow me to type the info into the appropriate fields. This however labor intensive and it is easy to make a mistake that may change a different field. Can I create separate listing or database (similar to the mail merge concept) that will just drop the info into the proper cells on the form with out me touching the form itself? You could create an Input sheet. I'd name it Input <bg>. Then in column A, put a nice description. In column B, put your entry: ...

Cannot send e-mail error #800CCC79-HELP!
Please, please, please if anyone knows why this is happening please tell me (I'm not very computer literate). I have Windows 2000 and use Outlook Express 6. I can receive e-mail but get the following error message when I try to send: The message could not be sent because on of the recipients were rejected by the server. The rejected e-mail address was xxxxxxx; Subject xxxxxxx; Account:xxxxxx; Server:smtp. highstream.net;Protocol SMTP, Server response: 550 not local host, xxxxx not a gateway,port:25, Secure[SSL];No, Server Error:550, Error Number:0x800CCC79 I'm begging anyo...

CRM Folders Missing in Outlook
Just upgraded from 1.2 to 3.0. The install went ok and CRM is working in Outlook except for the fact that the CRM folders are all missing on the left side. I can click on the Microsoft CRM folder, but the only thing underneath it is "Deleted Items" and "Search Folders". -- Brandon Presentations Direct - "Document Finishing Solutions" http://www.presentationsdirect.com 1=check if crm.pst has been installed or not (right click on outlook and properties and then data file ) 2= check if addin.dll is enabled or not. regards aami Yes on both counts. -- ...

Resource Capacity Planning
I'm looking for an Excel application that illustrates resources availability by week over time (3-6 months) Try: http://archive.baarns.com/software/ Click Software > On-Line Catalog > Excel Software > Management Software Scroll down and look for "Scheduler" (free excel file) "Paul Hipgrave" <phipgrave@rogers.com> wrote in message news:LHsmb.50236$h61.14914@news01.bloor.is.net.cable.rogers.com... > I'm looking for an Excel application that illustrates resources availability > by week over time (3-6 months) > > ...

How do I import my Outlook Express accounts and address book into
How do I import my Outlook Express accounts into Outlook. You dont, import. Within OE Export mail Within OL Import Addresses NB Both OE & OL have to be on the same PC and OE configured with the msg store "Cbleman" <Cbleman@discussions.microsoft.com> wrote in message news:3AF6415D-0511-4B04-8E34-3131388019AF@microsoft.com... > How do I import my Outlook Express accounts into Outlook. Cbleman <Cbleman@discussions.microsoft.com> wrote: > How do I import my Outlook Express accounts into Outlook. In Outlook, click File>Import and Export>Import Interne...

Open a Form at a Specific Time
I would like to open a form at a specific time of the day, everyday. Please help? -- Message posted via http://www.accessmonster.com Scheduled Tasks should do what you want. Steps 1. Open Control Panel 2. Look for Scheduled Tasks and double click it. 3. Click Add Scheduled Task then follow the wizard hope that helps User wrote: >I would like to open a form at a specific time of the day, everyday. > >Please help? -- spread the WORD Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201001/1 I'm sor...

Converting resources in Exchange 5.5 to be compatable with Outlook 2003!
Hi all, We running a NT4 Enviroment with Exchange 5.5 and and clients such as Outlook 2000 and 2002 originally this was Inbox but over the years we have uppgraded. OS's are 2K and XP. All working fine untill we starting installing Office 2003 with Outlook 2003 and now we canot use resources like calendar in Exchange 5.5 we can happy create new ones. Does anyone have best way of upgrading resources to be compatable with Office 2003. In a about 4 mounths we going to Exchange 2003 but untill then I need a quick fix :-) Thank you very much, Laz. Laz: Are you referring to automatic bo...

Formula input error help
I enter complex mathmatical formulas in excel spreadsheets frequently. If something isn't quite right xl makes suggestions on how to correct the formula. I never choose yes and then another warning pops up that tells what it thinks is wrong. This is a waste of time and very irritating. Is there any way just to turn all that assistance stuff off and have it place the word error or something in the cell? I am perfectly capable of finding the problem without the program's help. Excel 2002, Windows 2000 Pro Click on Tools|Options|Error checking and untick <Enable background er...

run time error; can not write to object
in 07 have form w/ onclick event of main form that opens a new form then having text in an unbound control of main form written into a text box on this new form run time error; can not write to object seems be triggered because the new form is opening with no records. the new form is in Date Entry property yes and when I manually open it - it opens to a new blank record....but when opening via the onclick docmd...it opens with no record... am perplexed... GBA wrote: > in 07 have form w/ onclick event of main form that opens a new form > > then having text in ...

How do Resource Groups relate to Resources
I am trying to figure out the linking table / GUID that connects Resource Groups to Resources/Users. Does anyone know what table in CRM connects these two? There isn't one. The group membership is defined in an XML document that is stored in the Constraints field of the ConstraintBasedGroupBase table (which is linked to ResourceGroup by them both having the same primary key value) -- David Jennaway - Microsoft Dynamics CRM MVP Web: http://www.excitation.co.uk Blog: http://mscrmuk.blogspot.com/ "BCote" wrote: > I am trying to figure out the linking table / GUID tha...

An unknown error has occured 05-11-10
Every time my email downloads I get the subject error a number of times. Once I say OK the download continues and I get all my messages. I'm not aware of an error message in Windows Mail that says "subject error". If that is not the exact error message, please copy and post the exact error message. --=20 Gary VanderMolen, Microsoft MVP (Mail) Microsoft MVP program: http://mvp.support.microsoft.com "adman1937" <adman1937@discussions.microsoft.com> wrote in message = news:3A158A86-7344-46E9-A464-4E89373F0274@microsoft.com... > Every time my ema...