Home » Developer & Programmer » Forms » how to restrict user to insert specific number of records (urgent)
how to restrict user to insert specific number of records (urgent) [message #195135] Wed, 27 September 2006 02:46 Go to next message
fassi79
Messages: 3
Registered: July 2006
Location: LAHORE
Junior Member
i have master detail Form. My requirement is as following.

1) In master block user enter other information and enter suppose 5 in a text item.

2) Then 5 rows should be display in detail block. and user couldnt enter more than 5 records in detail block.


Regards
Fassi
Re: how to restrict user to insert specific number of records (urgent) [message #195147 is a reply to message #195135] Wed, 27 September 2006 03:49 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I assume that you create 5 blank records for the user but aside from 5 rows another row is created when the user pressed arrow down and then he/she can enter the sixth record and so on...

Then put your code on when-new-record-instance trigger. clear_record if it's over 5.
Re: how to restrict user to insert specific number of records (urgent) [message #195169 is a reply to message #195147] Wed, 27 September 2006 05:06 Go to previous messageGo to next message
fassi79
Messages: 3
Registered: July 2006
Location: LAHORE
Junior Member
thanks for repsonse. please understand my question. Just i want to set the property "Number of record display=n".

no metter whats n has. it user enter 5 number of record Display " or grid should be 5.

best regards


Re: how to restrict user to insert specific number of records (urgent) [message #195471 is a reply to message #195169] Thu, 28 September 2006 20:28 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The 'Get_Block_Property(Records_Displayed)' command will show how many records are displayed but it is not an option with 'Set_Block_Property'.

If you really want to control EVERYTHING them you will need to define SEPARATE fields for EVERY item in EACH row and column and use the 'Set_Item_Property(visible)' command to 'hide' the ones you don't want displayed. Expect to take about 30-40 hours to write and decode this type of code to handle 5 rows of 10 columns.

By the way, what are you going to do with the 5th row in the database if the user changes the master record from '5' to '4'?

David
Previous Topic: Doubt in form
Next Topic: when_validate_item
Goto Forum:
  


Current Time: Fri Sep 20 13:32:28 CDT 2024