A
alex
I have a subform that opens in datasheet view. I would like users to
be able to add a new record based on the value (a single value) of an
existing one!
For example (I’ve already created a custom popup menu)…
The user right clicks a record under the field > StoreName…a menu pops
up with an AddRow command…user clicks on AddRow…a new record is
automatically added based on the value where the user right clicked.
I’ve tried assigning a macro to the custom command, but cannot get the
code to work.
The subform has a many-to-one relationship to the main form.
I ask this question because I’ve locked down the record on the many
side of the relationship (on the subform). I don’t want the user to
be able to arbitrarily add a new record (we all know what will happen)…
if they do not type a new record exactly like one in the main table,
they’ll get an referential integrity error (rightfully so). I assume
an easy way around this is to limit any new record to a preexisting
record already in the subform; a record assigned in the mainform.
I may have confused some…My mainform contains the subform and the
problem I mentioned above does not exist. What I do, however, is
allow the user to open the subform independently if he/she wishes
(it’s a space issue and seems to work just fine).
Any help would be appreciated.
alex
be able to add a new record based on the value (a single value) of an
existing one!
For example (I’ve already created a custom popup menu)…
The user right clicks a record under the field > StoreName…a menu pops
up with an AddRow command…user clicks on AddRow…a new record is
automatically added based on the value where the user right clicked.
I’ve tried assigning a macro to the custom command, but cannot get the
code to work.
The subform has a many-to-one relationship to the main form.
I ask this question because I’ve locked down the record on the many
side of the relationship (on the subform). I don’t want the user to
be able to arbitrarily add a new record (we all know what will happen)…
if they do not type a new record exactly like one in the main table,
they’ll get an referential integrity error (rightfully so). I assume
an easy way around this is to limit any new record to a preexisting
record already in the subform; a record assigned in the mainform.
I may have confused some…My mainform contains the subform and the
problem I mentioned above does not exist. What I do, however, is
allow the user to open the subform independently if he/she wishes
(it’s a space issue and seems to work just fine).
Any help would be appreciated.
alex