default id value when adding new record in browse table
Posted: Tue Jan 17, 2017 3:32 pm
I have a table of say clients with client_id, clients_name, clients_add etc fields I have another table with visits with vis_id, vis_clientid, vis_date, vis_reason etc fields.
In my clients form when I select a client, I have a tab for client details then another tab for visits. In the visits tab I have a browse field with #RECORD_ID# filter to show only the visits to the selected client. You can then select any visit from the browse table and it opens a new window with the visit details, this all works fine,
When I select the "Add Record" button from the browse screen to add a new visit for that client, it opens the blank visit form in the same window as the browse field, but what I am looking to do is to default the vis_clientid field in the visit form to be the value of the selected Client_id. Thought that I could use #RECORD_ID# but of course this is blanked for a new record. Any suggestion on how I can do this
In my clients form when I select a client, I have a tab for client details then another tab for visits. In the visits tab I have a browse field with #RECORD_ID# filter to show only the visits to the selected client. You can then select any visit from the browse table and it opens a new window with the visit details, this all works fine,
When I select the "Add Record" button from the browse screen to add a new visit for that client, it opens the blank visit form in the same window as the browse field, but what I am looking to do is to default the vis_clientid field in the visit form to be the value of the selected Client_id. Thought that I could use #RECORD_ID# but of course this is blanked for a new record. Any suggestion on how I can do this