General information
Category:
Forms & Form designer
>Question,
>
>I created a one to many form with the wizzard. I want to be able to add a record to the 'one' table and then add multiple records to the 'many' table.
>
>when I press the add key on the screen It asks me if I want to add to parent and child and then asks me the key field value.
>
>It there a better way that is a little more seemless. The key field is a caculated field based on what the user inputs in to some of the fields in the parent table.
>
Forget the wizard's toolbar, and create your own class. If you are familiar with class at least you can make buttons.
Create 4 buttons for record navigation -> top, bottom, prev, next
the code should be for top
if !eof()
skip
endif
and so on, same way create add, edit, find, brow, delete
in Add, straight away move the focus to parent field, after the user has entered search through locate or seek it is already there go into edit mode and if it not add in file. use a statement like
select max(keyfield)+1 from yourtable into array yourarray
replace keyfield with yourarray
when the control comes to grid, you an assign any key for adding records in it, In the when event of grid :-
on key label ctrl+n do addrec from yourfile
Try this,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only