It seems to me that this task should be a simple one, but I cannot find a way to do it.
The case: I am in a form (for the sake of argument, the Purchase Order form) viewing a record (for the sake of argument, Type="order", No.=3). Within the code, I have determined that I want to be looking at No.=27 instead. What I want to do, in code, is make Purchase Header No. 27 the active record in this form, without a lookup of any kind, and without opening another instance of the form. How does one replace the active record in a form?
Any help would be appreciated...Thanks in advance...
Pat Houstoun, NCSD
President, Management Software Solutions, Inc.
Pat Houstoun, NCSD
President, Management Software Solutions, Inc.
0
Comments
I think you are looking for the following code which will switch the active record in a form.
PurchHeader.SETRANGE("No.",??the NEW NO. ??);
If PurchHeader.FIND('-') THEN
Rec := PurchHeader;
You may have to handle the xRec, but I did not test that.
Steve Florko
NCPS,NCSD,NCDS,WSSD,WSWD
Application Development
I did put a modify and a commit before your code. Works perfectly. Many thanks.
By the way, please call me when you get a minute...
Pat Houstoun, NCSD
President, Management Software Solutions, Inc.
President, Management Software Solutions, Inc.
simply program:
Get (type::order,'27');
Currform.update
Marcus Fabian
m.fabian@thenet.ch
+41 79 439 78 72
[This message has been edited by fabian (edited 23-09-2000).]
Marcus Fabian