I have a form which displays client information. I have added a browse subform which shows data from a table holding information about important dates associated with that client.
My two tables are therefore:
clients (for which the primary key is id)
dates (for which the primary key is id, and which contains the foreign key clientid)
My browse subform uses the SQL:
SELECT * FROM dates WHERE clientid = #id#
This works well.
When it comes to creating a new record in the subform however, I need to automatically fill in the client id for the client currently being viewed in the master form. This way, any new record created from this browse subform will be associated with the correct client.
The only way I can find to do this is the have the default filter for the browse subform set to #id#, and then use the the following to automatically fill in the 'clientid' field once the edit form is opened:
SELECT #browse_filter#
The above does work, but it seems a little messy, is there a cleaner way to do this?
Thanks in advance.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Pulling master-form data into a browse subform
-
- Posts: 10
- Joined: Thu Jan 10, 2013 4:51 am
Re: Pulling master-form data into a browse subform
jmusther,
Using #browse_filter# is the way to do it.
Steven
Using #browse_filter# is the way to do it.
Steven