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!

Go directly to Form without a browse question 1

Status
Not open for further replies.

rleiman

Programmer
May 3, 2006
258
US
Hi Everyone,

Is it possible to call a Form procedure without going through a browse procedure? If so, can you tell me what to do to implement this?

Thanks.

Emad
 
Hi Emad,

Set the Global Request to InsertRecord, ChangeRecord or Deleterecord and call the FORM. Make sure you have cleared the Buffer and Primed the defaults before calling to Insert. Also, make sure you have retrieved the Record before calling to Change/Delete.

Regards
 
Hi ShankarJ,

By clearing the buffer do I issue somthing like this?
Get (DefaultSettings, 0)

Thanks.

Truly,
Emad
 
Hi Emad,

No. Just CLEAR(PRE:Record) & all the MEMOs in the table as MEMOs are always outside the RECORD structure.

To Insert

CLEAR(PRE:Record) ; CLEAR(PRE:Memo1) ; CLEAR(PRE:Memo2)

PRE:Column1 = '...' ! Prime Initial Values if needed
PRE:Column2 = '...'

GlobalRequest = InsertRecord

MyForm

CASE GlobalResponse
OF RequestCompleted
...
OF RequestCancelled
...
END

To Change

CLEAR(PRE:Record) ; CLEAR(PRE:Memo1) ; CLEAR(PRE:Memo2)
PRE:primKeyCol1 = '...' ! Prime Primary Key
IF NOT Access:FILE.Fetch(PRE:primKey)
GlobalRequest = ChangeRecord

MyForm

CASE GlobalResponse
OF RequestCompleted
...
OF RequestCancelled
...
END
END

To Delete

CLEAR(PRE:Record) ; CLEAR(PRE:Memo1) ; CLEAR(PRE:Memo2)
PRE:primKeyCol1 = '...' ! Prime Primary Key
IF NOT Access:FILE.Fetch(PRE:primKey)
GlobalRequest = DeleteRecord

MyForm

CASE GlobalResponse
OF RequestCompleted
...
OF RequestCancelled
...
END
END

Regards
 
Hi ShankarJ,

Wow! Thank you for all that code.

I will implement mine based on it.

Truly,
Emad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top