The controls are all bound to fields in a table. When you click on the
button it adds the information in the controls to the table. I didn't
write any code for it. I used the wizard to create the form.
iwasinnihon,
Ok, thanks. So what does clicking on the button actually do? If the
controls are bound, then clicking the button doesn't actually adds the
information in the controls to the table. I wouold guess it either
closes the form, or moves to a new record?
As for the listbox (the subject header of your message says combobox,
whereas in the description you say listbox, so I will take it to be a
listbox - is that right?), I gather that this is unbound (i.e. no
Control Source) - is that right? Can you look at the Properties of the
listbox, and let us know what it has for these properties:
Row Source
Column Count
Bound Column
Column Widths

Signature
Steve Schapel, Microsoft Access MVP
> The controls are all bound to fields in a table. When you click on the
> button it adds the information in the controls to the table. I didn't
> write any code for it. I used the wizard to create the form.
iwasinnihon - 29 Nov 2006 21:30 GMT
The button refreshes the list box and clears the controls for a new
record.
Here are the properties that you wanted
Control Source is blank
Row Source
SELECT Software.SoftwareID, Software.Title, Software.Platform,
Software.Maker, Software.KeyCode, Software.TotalLicensesCount,
Software.Price, Software.[MediaCD/DVD], Software.PurchaseDate FROM
Software ORDER BY [Title];
Column Count
8
Bound Column
1
Column Widths
0";1";1";1";1";1";1";1";1"
> iwasinnihon,
>
[quoted text clipped - 19 lines]
> > button it adds the information in the controls to the table. I didn't
> > write any code for it. I used the wizard to create the form.
Steve Schapel - 29 Nov 2006 21:49 GMT
iwasinnihon,
Ok, on the basis of the information I have so far, it seems to me that
you could put code similar to this on the Click event of a button, and
run it after selecting an item in the listbox...
Me.SoftwareID.SetFocus
DoCmd.FindRecord Me.NameOfListbox
(substitute actual name of listbox).
Let us know how you get on with this.

Signature
Steve Schapel, Microsoft Access MVP
> The button refreshes the list box and clears the controls for a new
> record.
[quoted text clipped - 40 lines]
>>> button it adds the information in the controls to the table. I didn't
>>> write any code for it. I used the wizard to create the form.
iwasinnihon - 29 Nov 2006 22:57 GMT
When I try that I get the following error
You can't use Find or Replace now.
> iwasinnihon,
>
[quoted text clipped - 56 lines]
> >>> button it adds the information in the controls to the table. I didn't
> >>> write any code for it. I used the wizard to create the form.
iwasinnihon - 29 Nov 2006 23:04 GMT
I figured out why I was receiving that error. I was bringing up that
form with a button on a menu with the following command.
DoCmd.OpenForm stDocName, , , acAdd
This brought it up in filtered mode. I was doing that because I want
the form to come up with the controls blank. Or in other words ready
to have the next record entered. Is there another way to do this?
> When I try that I get the following error
>
[quoted text clipped - 60 lines]
> > >>> button it adds the information in the controls to the table. I didn't
> > >>> write any code for it. I used the wizard to create the form.
Steve Schapel - 30 Nov 2006 08:41 GMT
iwasinnihon,
I think there are basically two approaches you could take here.
First is, instead of your initial use of the acAdd argument, do it like
this instead...
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acNewRec
Alternatively, I *think* (didn't test) you could add a line like this
ahead of the FindRecord code I suggested before...
Me.DataEntry = False

Signature
Steve Schapel, Microsoft Access MVP
> I figured out why I was receiving that error. I was bringing up that
> form with a button on a menu with the following command.
[quoted text clipped - 4 lines]
> the form to come up with the controls blank. Or in other words ready
> to have the next record entered. Is there another way to do this?