When you set the Data Entry Property to yes you are telling Access to 'Put me in a position so that I can start to create a new Record' At this point the Record does not exist.
Because the record does not exist it cannot have a bookmark because bookmarks can only be allocated to records that exist.Because the bookmark does not exisit you cannot set a pointer to the bookmark i.e you cannot point to something that does not exist (Although a Zen buddist may argue this point)
When you are in Data Entry mode your form does not have access to the other records, it is simply placed in the position to start accepting new data.
If you want to open the form ready for data entry then you will need to make sure your Combo box is set to enabled = false. This will prevent the user from clicking on the Combo box which would generate a error. Also alter your code so that it does not try to allocate the bookmark.
It can sometimes be a bit confusing when using a common form to do both Data Entry and Data Editing because the state of the underlying records differ. i.e In data edit mode the underlying record DOES exist and at least one field has been initialised (i.e has a value of not NULL) therefore you can edit it, in data Entry mode the record DOES NOT exist until you have entered some data (i.e changed the state of at least one field from NULL) and updated the database to accept the new record.
A common technique is to use different forms for Data Entry and For Data Editing. If you want to use a common form for both Data Entry and Data Editing then you must ensure that the properties that apply to Data Edit but which are not applicable to Data Entry are all 'switched off'. You will then have to switch them back on again when you switch back to Data Edit mode.
Simplist way to remember it is
you can only do 3 basic things with records
Add a new record (Data Entry)
Edit A record (Data editing)
Delete a record
Applying this to your question:
You can have a 'blank' form which
1-Is unbound and cannot accept any data until it is bound (not much use)
2-A form awaiting Data Entry. In this state the form exists but it has no underlying record
3-A form where at least one field has its state changed from NOT NULL to "" (Blank)
So if you want a form to open and Appear blank you need to ensure that a least one field is set to not Null. You can do this in a number of ways. The easiest is to set a default value for one of the forms fields, if you want it to appear blank then set the value to "". Or you could assign the "" value in code during the forms OnOpen event.
Once you have changed the state of one of the forms underlying fields from NULL and you have saved the record then Access will allocate a bookmark to the record.
Sorry if you know most of this but it may be of use to others. Also I hope it helps to explain a common problems some people have in understanding the difference between BLANK and NULL.
Fields with a value of NULL are uninitialised fields (i.e have no value).
BLANK fields are fields containing a zero length string (have a value of zero length string)
Forms opened in Data Entry Mode have all the fields set to NULL
Forms opened with at least one record set to not Null, even if that field is "" (blank", are in a different state to the Data Entry form even if they look the same
Hope This helps
Regards
Trevor from
www.accesswatch.co.uk
[This message has been edited by accesswatch (edited 10-06-2000).]