Home » Developer & Programmer » Forms » no of records before save (6i,xp,10g)
no of records before save [message #403560] Sat, 16 May 2009 23:35 Go to next message
Messages: 356
Registered: March 2005
Senior Member
I have a form with 4 blocks.

I am assigning the primay key value to a text item after exiting from 3rd block(on successful completion).

I want to create two records in 3rd block ONLY IF there are no existing records.

my question is.

How can i check the no of existing records in this block,
while the records have not been saved yet AND the primary key value is not also being assigned?

Re: no of records before save [message #404498 is a reply to message #403560] Fri, 22 May 2009 00:36 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I suggest you rethink your logic.

The "usual" / "normal" / "works best most of the time" way to run a master/detail (and master/detail/sub-detail) form is to use the Forms wizards to create the 'blocks', create the 'relations', and for primary keyed records to use a when-create-record trigger on each lower block to carry across the key data from the higher level.

To keep the form simple I just let the database throw errors for me. If you want this to happen after each record then either set the block characteristics, or put a 'commit' statement in the 'post-record' trigger.

Previous Topic: When mouse Double click (enter Query)(Execute Query)
Next Topic: To Get Processor serial no. its urgent !!!!!!!!!!!!!!1
Goto Forum:

Current Time: Thu Jul 20 19:59:32 CDT 2017

Total time taken to generate the page: 0.05086 seconds