> I have an unbound combo box that when a selection is made needs to
> insert a record to a related table. I can only do this if the record
> is 'dirty' and my primary key has been generated. If they click the
> combo box before this happens, I need to somehow get the primary key
> so I can insert the related record. What is the best way to do this?
You can force the form to become dirty by setting some bound control
equal to its own current value, as in:
Me!txtMyBoundTextbox = Me!txtMyBoundTextbox
However, if it's a new (unsaved) record and your related table has
referential integrity enforced, you still won't be able to add a record
to the related table until this record has been saved. In that case,
you may have to somehow defer adding that record until after the form's
record has been saved.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)