The problem with your code is that you're trying to access a
property as if it where a
function and that not only can't be done but doesn't make sense either: that's what the getter/setter are for. Using the (more correct) format:
TEventsDM = class(TDataModule)
..
private
fCurrentEvent : tDataResults;
Procedure SetCurr(InData : tDataResults);
Function GetCurr : tDataResults;
public
constructor Create(Sender: TObject);
property Current : tDataResults read GetCurr write SetCurr;
end;
EventsDM : TEventsDM;
when your other code reads or writes
EventsDM.Current, as in:
MyDR := EventsDM.Current;
{...more code ...}
EventsDM.Current := MyDR;
the compiler generates calls to
GetCurr and
SetCurr transparently, without any more intervention from yourself.
Maybe you need to give a look-through to the Language Reference
ETA: I forgot! Regarding this:
If I try and tidy up the property/s to
property SetCurrent : tDataResults write SetCurr;
property GetCurrent : tDataResults read GetCurr;
The compile fails reporting: 'No member is provided to access property'.
In which line does it fails? I have just tested with this code:
TForm1 = class(TForm)
{...standard controls & handlers here ...}
private
procedure SetWriteMe(AValue: String);
function GetReadMe: String;
public
property WriteMe: String write SetWriteMe;
property ReadMe: String read GetReadMe;
{There is "proper" code for SetWriteMe and GetReadMe:
ShowMessage for WriteMe and InputBox for ReadMe}
end;
and it compiles (and works) alright. It may or may not make sense but read-only and write-only properties work ok.