RSS

A Message Board, Guestbook, or Poll hosted for your website.
Iron Speed Technical Forums

Register Login New Posts Chat
 
Iron Speed > Forums > Using Iron Speed Designer V5.X > ISD and Access
 
Username:  
Password:  
 
   
 


Thread Tools Search This Thread 
Reply
 
Author Comment
 
mike623317
Registered: 10/28/09
Posts: 11

    11/06/09 at 07:21 AMReply with quote#1

Does anyone know why ISD doesn't import or trigger the macro from an access database?

It imported the tables and queries just fine.

Thanks
Michael

akeshgupta
Avatar / Picture

Iron Speed MVP
Consulting Organization

Registered: 04/25/04
Posts: 4,244

    11/06/09 at 08:12 AMReply with quote#2

Hello Mike:
 
What is your usecase which is requiring you to interact with Access macros?

Thanks.


__________________
Akesh Gupta
Iron Speed Designer MVP
Enterprise Solutions Architect
ExecuTrain of Long Island (http://www.etli.com)
Light Speed Solutions (http://www.lightspeedsolutions.com)

If I rest, I will rust ! Let's share the knowledge !
mike623317
Registered: 10/28/09
Posts: 11

    11/06/09 at 08:32 AMReply with quote#3

Hi Akesh,

I have a 'universal table' from which a new user would select items they want. My macro basically copies the 'itemID' of the the ones they selected and copies it to a 'customer table' along with their 'customerID'.
 
As ISD doesnt appear to recognised my macro, i'm wondering how to make that fuction work.

Thanks
Mike
akeshgupta
Avatar / Picture

Iron Speed MVP
Consulting Organization

Registered: 04/25/04
Posts: 4,244

    11/06/09 at 10:52 AMReply with quote#4

Hello Mike:
 
If you know the ItemIDs, you can easily write code to generate records in any table.
 
An example could be:
 
Dim myRecord as new CustomerItemRecord
myRecord.CustomerID = 123
myRecord.ItemID = 1
myRecord.Save
 
You can put this in a For loop and a Transaction.
 
HTH,

__________________
Akesh Gupta
Iron Speed Designer MVP
Enterprise Solutions Architect
ExecuTrain of Long Island (http://www.etli.com)
Light Speed Solutions (http://www.lightspeedsolutions.com)

If I rest, I will rust ! Let's share the knowledge !
mike623317
Registered: 10/28/09
Posts: 11

    11/06/09 at 11:05 AMReply with quote#5

I will not know the ItemIDs. Different customers will select different items and therefore different ItemIDs.

So...  how to amend the code to generate records in a table when the ItemID is not known in advance. Anyone?
 
Dim myRecord as new CustomerItemRecord
myRecord.CustomerID = ?
myRecord.ItemID = ?

myRecord.Save


Michael

akeshgupta
Avatar / Picture

Iron Speed MVP
Consulting Organization

Registered: 04/25/04
Posts: 4,244

    11/06/09 at 12:45 PMReply with quote#6

Hello Mike:
 
The code in Macro must be assigning ItemIDs via some logic.  I will use the same logic here in the code.
 
Can you tell me a bit more as to what is going on in the Macro?
 
Thanks.

__________________
Akesh Gupta
Iron Speed Designer MVP
Enterprise Solutions Architect
ExecuTrain of Long Island (http://www.etli.com)
Light Speed Solutions (http://www.lightspeedsolutions.com)

If I rest, I will rust ! Let's share the knowledge !
mike623317
Registered: 10/28/09
Posts: 11

    11/06/09 at 04:50 PMReply with quote#7

Hi Akesh,

Here is my Macro code :
INSERT INTO tblCustomerOrder SELECT tblUniversalInv.* FROM tblUniversalInv WHERE AddtoMyOrder = -1

Table tblUniversalInv - contains all of the items. Customers select a check box which is a field called "AddtoOrder".  Macro appends the records from tblUniversalInv to tblCustomerOrder where the AddtoOrder field = Yes

I am trying to find how to do this function in ISD.

Thanks for your help.
Mike

 

akeshgupta
Avatar / Picture

Iron Speed MVP
Consulting Organization

Registered: 04/25/04
Posts: 4,244

    11/06/09 at 07:38 PMReply with quote#8

Hello Mike:

You can use something like:

For each Record in TblUniversalInvTable.GetRecords("AddToMyOrder = 1")
     Dim myRecord as New CustomerItemRecord
     myRecord.CustomerID = CustomerID from the Customer Record
     myRecord.ItemID = Record.ItemID
     myRecord.Save

Next

Hope this helps you get the idea.




__________________
Akesh Gupta
Iron Speed Designer MVP
Enterprise Solutions Architect
ExecuTrain of Long Island (http://www.etli.com)
Light Speed Solutions (http://www.lightspeedsolutions.com)

If I rest, I will rust ! Let's share the knowledge !
mike623317
Registered: 10/28/09
Posts: 11

    11/07/09 at 11:06 AMReply with quote#9

Thank you very much for the code.

.. However, where exactly do i place this in ISD? In code customization?

Previous Thread | Next Thread
Reply

  Bookmarks  
Digg Diggdel.icio.us del.icio.usStumbleUpon StumbleUponGoogle Google

Download Iron Speed Designer

Privacy Statement