G
Guest
Here is the problem:
I have a form, with a button that opens another form, that decides which
records to show based on it's foreign key matching the primary key of the
first form. If there is at at least one record, my application works fine
and displays it.
However, since the user cannot directly create these records in the table, I
do not allow them "Add Record" privilages on the form that will be open.
Because of this, if there are no records to show, the screen appears totally
blank.
I don't want my users faced with a blank screen. I would greatly prefer if
I could write some code that, as the form is opened, checks to see if there
are any records to display. If there are not, then a messagebox appears and
says: "Please do such-and-such to create one of these records." No blank
screen.
So...essentially what I need is a couple lines of code that checks a table
to the number of records that have a certain foreign key. Thoughts?
Comments? Suggestions?
Thanks!
Dustin Ventin
I have a form, with a button that opens another form, that decides which
records to show based on it's foreign key matching the primary key of the
first form. If there is at at least one record, my application works fine
and displays it.
However, since the user cannot directly create these records in the table, I
do not allow them "Add Record" privilages on the form that will be open.
Because of this, if there are no records to show, the screen appears totally
blank.
I don't want my users faced with a blank screen. I would greatly prefer if
I could write some code that, as the form is opened, checks to see if there
are any records to display. If there are not, then a messagebox appears and
says: "Please do such-and-such to create one of these records." No blank
screen.
So...essentially what I need is a couple lines of code that checks a table
to the number of records that have a certain foreign key. Thoughts?
Comments? Suggestions?
Thanks!
Dustin Ventin