Hi all,
My form contains one subform. Source table for form and subform is same. suppose table name is 'Test'.
Table 'Test' contains 10 records. Detail of each record i am displaying on form and all the records i am displaying on subform.(with some important field of table 'Test')
What i want is whenever i point a particular record in a subform, detail information of that record should get displayed on the form. For that I have created one function in my form i.e. moverecord. I have handled OnAfterGetCurrRecord trigger of subform. My code is below:
OnAfterGetCurrRecord() [Event of subform]
dong.moverecord(value);
dong is a variable of type Form.
moverecord(value : Integer) [Function on form]
dongrecord.get(value);
Rec:=dongrecord;
value is the value of primary key.
But record doesn't move. If i write
dongrecord.get(//Some Constant value of primary key)
Rec:=dongrecord;
in OnAfterGetCurrRecord trigger of form then i am getting the record.
Please help.
0
Comments
Have you tried to put a tablebox and a tab control on the same form?
You can then browse through the records and view detailed information at the same time.
Just take a card form and add a table box to it, and see the results.
Do i need to set some other properties?
I searched forum. but was unable to find the solution.
Please help.
- Create New Form
- Select Table Name : I.e. Sales Header.
- Check Create Form Using a wizzard and select Create Tabular Type form
- Select the fields u want in the list.
- Press Finish.
- Now your are in screen design mode.
- Increase the heigth of the screen.
- Move the table box to the bottom.
- Go to field menu, select fields you want to add to the detail.
Press CTRL+R et voila \:D/
If you do not have enough room for all detail fields simply drop a TabControl first...
Have fun!
Peter
MBS NAV Consultant
It works perfectly. But in the current situation , my subform is linked with my form with some condition. i.e my subform and form both display only those records where userid="test" . How can i achieve this with table box?
Just remember the same code and properties go for the normal fields and the tablebox.
Thanks for your replies.