Don't display a record on the form

P

Peter Stone

Good Evening

I have a Master table: tblText and a Child table: tblDestinations

On the form frmText, users selects sets of records with the Combo Box:
cboDestination and users can see the heading of the first record in the set
in the Text Box: txtHeading (all the records appear in a List Box).

cboDestinatiom
Row Source property:
SELECT tblDestinations.DestinationsID, tblDestinations.Destination,
tblDestinations.DestinationType, tblDestinations.Publish FROM tblDestinations
ORDER BY tblDestinations.Destination;

After Update Event procedure:
Private Sub cboDestination_AfterUpdate()
Me.lstSelectRecord.Requery
Me.RecordsetClone.FindFirst _
"[DestinationsID] = " & Me![cboDestination]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

This works fine when a record exists, but when there isn't a record, the
Combo Box cboDestination is displaying the selected destination while the
Text Box: txtHeading is diplaying the first record in the table.

I think the simplest solution would be to not display any record when there
isn't one and open a dialogue box inviting users to go to a new record (I
already have a mechanism to go to a new record).

I don't want the form to sit on a new record on entry, because it may result
in a large number of blank records.

1. How do I not display any record on entry to frmText?
2. How do I not display a record when the selected destination has no records?

Thank you

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top