Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Norming Asset Management Macros

Status
Not open for further replies.

mdewis

Technical User
Jun 7, 2006
23
CA
I am using Norming Asset Management as a Fixed Assets module in Accpac 5.3. Macros don't seem to record in this module. I am trying to write code to allow for an Acquisition Batch Entry. I am using the GL Batch Entry code that I have as a guide and I am tweaking accordingly.

Nothing seems to work. I can create a new batch but can't populate any of the batch header fields such as "descritpion". If I can't record macros in this module, is it possible that VBA code doesn't work in this area?

Thanks,
Mike
 
Most third-party products don't record. Use RVSPY to figure out how they do it.

Jay Converse
IT Director
Systemlink, Inc.
 
When 3rd party developers write their software in the SDK they need to enable macro recording for their modules, not all are aware of this and it is a small thing to do, kinda pee's me off when they do not enable macro recording.
 
Thanks.

If anyone has any examples of creating an Asset Management Acquisition Batch via vba code, it would be greatly appreciated.

Thanks,
Mike
 
You might have more success sending an e-mail directly to Norming and ask them for an example.

Are you trying to read information from Norming or write information to the Norming tables?

If you are only reading then don't bother with the views - just use ODBC. You'll have much faster performance that way.

If you are writing data then I would strongly encourage you to use the views to avoid messing up the database.

Regards,

Django
 
Thanks.

I am actually looking to write data...ie create the ability to use an excel file to populate an Acquisition Batch Entry. It seems like it is missing the File...Import feature that is available on most other Accpac modules. We don't use the ODBC feature here so I would have to go the views route.

RVSPY seems pretty involved, messy and complicated but if that is the route I should go, assuming I can't get Norming to send me anything, that is what I'll do.

Again, if anyone has had any luck with creating a batch entry macro for Norming Asset Management, I would greatly appreciate seeing the code.

Thanks,
Mike
 
Are you trying to take on assets, or is this something you will be doing on a regular basis?
 
This would be to replace the process of manually entering a batch from a list of invoices on a monthly basis. I know that you can import in additions into the Asset Register but this doesn't produce an Acquistion Batch in Asset Manager. It only adds the assets into your register and then calculates depreciation on the new balance. I want to have an Acquisition Batch Entry created.

Mike
 
A word of advise: Excel is the worst to use for data entry by users. There is no data validation in the "fields" and users tend to enter garbage which will cause you much pain. Why reinvent the wheel? There is a batch entry screen, let them use it.
 
The Excel File would be an export from another system. It would be a starting step and then I would look to directly interface between the other system and Asset Manager.

Mike
 
Miraculously, I was able to get a little further in this process by using RVSPY. I am attempting to replicate a GL Batch Entry using VBA for a Norming Acquisition Entry. I am able to update the Batch Number and Batch Description, however, I keep getting errors when I try to update the Acquisition Batch Detail. The error I get is "Attempt to modify a different record than was retrieved".

I suspect this is an error that you can see in other areas as well such as w/ GL Batches.

Does anyone know a quick solution to this? I have a feeling I am not updating / inserting / init in the right place.

I'll send my code if more detail is required.

Much Appreciated,
Mike
 
Can anyone help w/ this? I can create a batch and can add lines of detail to the batch but only if the first line has already been entered. That is, I can only add lines to the batch detail after there is one line of data already entered.

I suspect I have my updates and inserts in the wrong place or I have forgotten something like an "init".

Here is the code:

On Error GoTo ACCPACErrorHandler

Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLICATION")
Set objWorkBook = objExcel.Workbooks.Open("s:\Accpac Macros Do Not Delete\StillTesting\ASSET MANAGER TEST.xls")
Set objworksheets = objWorkBook.Worksheets

Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)

Dim temp As Boolean
Dim AM1Batch As AccpacCOMAPI.AccpacView
Dim AM1BatchFields As AccpacCOMAPI.AccpacViewFields
mDBLinkCmpRW.OpenView "AM0001", AM1Batch
Set AM1BatchFields = AM1Batch.Fields

Dim AM2Detail As AccpacCOMAPI.AccpacView
Dim AM2DetailFields As AccpacCOMAPI.AccpacViewFields
mDBLinkCmpRW.OpenView "AM0002", AM2Detail
Set AM2DetailFields = AM2Detail.Fields

AM1Batch.Compose Array(AM2Detail)

AM1Batch.Browse "(ACQHID = " & InputBox("Enter Batch Number") & ")", True

Do While AM1Batch.Fetch
Loop


AM2Detail.Read
AM2Detail.Fetch

For Each cell In objworksheets("Sheet1").range("a2:a5")

AM2Detail.Insert
AM2Detail.Fields("ASSETNO").Value = cell.Value
AM2Detail.Fields("ASSETDesc").Value = cell.offset(0, 1).Value
AM2Detail.Fields("GROUP").Value = cell.offset(0, 2).Value
AM2Detail.Fields("AQUCODE").Value = cell.offset(0, 3).Value
AM2Detail.Fields("ACCSET").Value = AM2Detail.Fields("COSTCENT").Value
AM2Detail.Fields("BKMETHOD").Value = cell.offset(0, 4).Value
AM2Detail.Fields("BKPERDID").Value = cell.offset(0, 5).Value
AM2Detail.Fields("BKESTY").Value = cell.offset(0, 9).Value
AM2Detail.Fields("BKVALUE").Value = cell.offset(0, 10).Value

AM2Detail.Update
Next cell

AM1Batch.Update

Exit Sub
 
Why are you .Reading and .Fetching AM2Detail? You should just .Init and .Insert.

Jay Converse
IT Director
Systemlink, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top