Form using Combo Box to enter info

C

ChadMT74

Hi all, I know this should be a pretty simple question but I can not
get the answer via forms and the 3 books I have.

I have a table to track my internal invoices so I have the following
fields:

Vendor
Invoice#
Invoice Amt
Invoice Date
Date Paid

I have a form that allows me to input the Vendor, Invoice#, Invoice
Amt, & Invoice Date. Two weeks later when I get confirmation of the
invoice being paid I tried to set up another form that does the
following

1 - Select the invoice#
2 - Get Vendor, Invoice Amt, Invoice Date (for information for the
user)
3 - Be able to enter the Date Paid

I really do not want to use the CTRL+F to find the record #, I want
the Vendor, Invoice#, Invoice Amt, and Invoice Date to be 'locked' so
that they can not be input and only the Date Paid can be input.

I set up a form that has the invoice number as an unbound combo box
and all the other fields as combo boxes with a control source of
Combo1. So when I select the correct invoice # I get all the info I
need to ensure this is the correct invoice. The problem is I can not
input the date paid. I tried to move the LIMITTOLIST property to No
and I get an error message "Access can not set the Limittolist
property to No right now. The first visible column, which is
determined by the ColumnWidths property, isn't equal to the bound
column. Adjust the ColmnWidths property first, an then set the
LimittoList property." I have tried adjusting the Column Widths but
it has not helped.

Can anyone tell me what I am doing wrong or suggest a way to go about
this?

Thanks in advance.
 
R

ruralguy via AccessMonster.com

So that you don't get off on the wrong foot, are these fields available in
another table or tables?
 
B

Beetle

I could be wrong, but from your description it sounds like you're using the
column property of your unbound combo box to populate the other fields on
your form, which would explain why you can't update the data. There's
probably more than one way to accomplish what you want, but here is one
option you could try.

(This assumes that the name of your unbound combo box is Combo1. If not
you'll have to modify the control name as needed)

Create a simple query that shows all the fields form your table. In the
Invoice# column put the following in the criteria field; (do this in design
view of the query)

Forms![name of your form]![Combo1]

Now in your form, set the record source to the new query. Also change the
control source of all the fields on your form to the corresponding field in
the query EXCEPT for Combo1 (leave that unbound). (BTW, you mentioned in your
post that all of the controls on your form are combo boxes, if so you might
want to change them to text boxes, except for Combo1). Then set the locked
property of all the controls to yes, except for Combo1 and DatePaid

Next, modify the row source of Combo1 so that it only retrieves the
Invoice#. You shouldn't need the other columns for this method. Also, in the
After Update event of Combo1 put the following code;

me.requery (this will requery the info each time a new selection is made in
Combo1)

If you don't wan't the Invoice# to be displayed twice on your form, you
could hide the Invoice# control that is bound to the new query and just have
Combo1 be visible.

HTH
 

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