Create New Microsoft Access Records from a Combo Box
Question details
Use a combo box to open an existing client ticket or start a new record when the ticket number does not exist.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- An unbound form uses a combo box to select tickets and custom code to save client data.
- Observed behavior
- The bound-form approach does not work with the unbound form, and saving a new record can report that TicketNumber is missing even when it appears on the form.
Open the form in Design View and check its Record Source property. An empty Record Source generally indicates an unbound form; also identify the combo box, TicketNumber control, and existing Save Record event procedure.
Handle new tickets with the unbound form's existing save code
Use this approach when the form is unbound and custom code loads and saves ticket data.
An unbound control displaying a ticket number does not automatically write that value to the table. The save procedure must include TicketNumber in its insert operation or assign it to the new data record.
In Access, open the form in Design View and use the Property Sheet to check the names of the ticket combo box and TicketNumber control. Open the Save Record button's On Click event to inspect the existing save code.
Add a New Ticket button in Design View, or add a New Ticket choice to the combo box. Use the button's On Click event or the combo box's After Update event to run the new-record logic.
In the new-ticket event procedure, clear the client and ticket detail controls and reset the form's existing data object or state flag to indicate a new record. If the user has already entered a ticket number, preserve it before clearing controls and restore it to the TicketNumber control.
In the Save Record button's event procedure, make sure the new-record insert or data-object assignment reads the TicketNumber control and writes its value to the TicketNumber field. Check that any query parameter name and data type match the field.
Open the form in Form View. Select an existing ticket to verify that its data loads, then start a new ticket, enter its number and details, and click Save Record. Open the underlying table or query to confirm the new row contains the ticket number.

Navigate and add records on a bound Access form
Use this approach if the form has a Record Source and is configured to allow additions.
Manage ticket lists with WPS Spreadsheets
WPS Office is a free, lightweight alternative for working with Office files in a familiar interface. Open an Excel ticket list in WPS Spreadsheets for an easy transition, but continue to use Microsoft Access for Access databases, forms, and VBA.

Frequently Asked Questions
Why does Access say TicketNumber is missing when it is visible on the form?
On an unbound form, the visible control is not automatically connected to the table field. Open the Save Record button's On Click event and check that its insert or data-object code writes the control's value to TicketNumber.
How can I tell whether my Access form is bound?
Open the form in Design View, select the form, and inspect Record Source in the Property Sheet. If it is empty, the form is generally unbound.
Can I use the combo box's Not In List event for a new ticket?
Yes. When Limit To List is enabled and a user enters a value not in the list, the Not In List event can run code to handle it. For an unbound form, that code must cooperate with the existing new-record and save logic.
Why doesn't DoCmd.GoToRecord create a row on my unbound form?
DoCmd.GoToRecord navigates records in a bound form or other record source. An unbound form needs its own code to reset the entry controls and insert the new row.
Can WPS Office run my Access form and VBA code?
No. Use Microsoft Access to maintain Access forms and their VBA. WPS Spreadsheets can work with ticket lists saved in Excel formats, but it is not a replacement for an Access database application.




