annoying automation object X message

compiler

New member
Local time
Today, 08:07
Joined
Feb 14, 2011
Messages
5
In my database 2 table:

Table "Cylinders" which contain 2 fields:
- [Cylinder Number] as primary key and on the one side of the relationship- [Cylinder Location] as a lookup field with two values "IN" or "OUT"

Table "Client Deals" which contains 2 fields:
- [Cylinder Number] on the many side of the relationship
- [Client Name]

the cylinder is delivered full (of any material) to clients and returned empty by them later. that's the reason behind [Cylinder Location] IN or OUT .

also created form "Clients Deals" to fill the seconed table with the clients orders. The form contains a command button "Save" attached to a saving macro. Everything worked fine until I wanted to made some restrictions on orders so that a client can't order a cylinder if it's used by another client. I wrote the following line on the saving macro:

Condition:[Forms]![Clients Deals]![Cylinder Number]=[Cylinders]![Cylinder Number] And [Cylinders]![Cylinder Location]="OUT"

Action: MsgBox

Arguments: The cylinder is not available, Yes, None,

~~ & certainly followed by a StopMacro Action ~~

When I hit the save button I get the message below no matter the cylinder location:

"The object doesn't contain the Automation object 'Cylinders'.You tried to run a visual basic procedure to set a property or method for an object. However, the component doesn't make the property or method available for Automation operations.Check the component's documentaion for information on the properties and methods it makes available ofr Automation operations."

I think that forms prohibits using tables fields on macro conditions. so please help me overcome this issue coz i googled for a solution and no positive results
 

Users who are viewing this thread

Back
Top Bottom