control source not listed

  • Thread starter Thread starter Brad Reichert
  • Start date Start date
B

Brad Reichert

I added a field to a table and now want to add text box to a form to enter
data into that field. When I create the text box, that field is not listed
in the control source. If I use the expression builder, I can select that
table and field but then the text box shows an error. How do I add a text
box? I used the wizard to create the original form. The form has controls
for 2 tables if that matters.

Thanks,

Brad
 
Hi,
Your form is probably based on a query. You have to
add the new field to it.
ON the form's property sheet, click on the Data tab.
The Record Source property will show you the data source for the form.
Click on the elipisis (...) and the query should be displayed.
Add your new field to it.
 
Yup that was it. Now I've got a new issue.

I added a new field to my tables. I have a table for inventory and a table
for defaults specs. When a model number is selected from a combo box I've
got code to populate text boxes based on the default values. I added the
new field to both tables but can't get the code to populate it. I added the
field (RAM) in column 3 (I thought) but when I updated by code it just moved
everything to the wrong box and didn't populate the new field. I then
changed the new field row value to the end and the others are fine but the
new one is not populated. What might I have wrong?

Thanks,

Brad

Private Sub PrinterModels_AfterUpdate()
Me!PrinterModels1 = Me!PrinterModels.Column(0)
Me!Type = Me!PrinterModels.Column(1)
Me!Interface = Me!PrinterModels.Column(2)
Me!RAM = Me!PrinterModels.Column(9) ***new***
Me!PPM = Me!PrinterModels.Column(3)
Me!DPI = Me!PrinterModels.Column(4)
Me!CartridgeModel = Me!PrinterModels.Column(5)
Me!Color = Me!PrinterModels.Column(6)
Me!PPMColor = Me!PrinterModels.Column(7)
Me!ColorCartridgeModels = Me!PrinterModels.Column(8)
End Sub
 
Brad Reichert said:
Yup that was it. Now I've got a new issue.

I added a new field to my tables. I have a table for inventory and a table
for defaults specs. When a model number is selected from a combo box I've
got code to populate text boxes based on the default values. I added the
new field to both tables but can't get the code to populate it. I added the
field (RAM) in column 3 (I thought) but when I updated by code it just moved
everything to the wrong box and didn't populate the new field. I then
changed the new field row value to the end and the others are fine but the
new one is not populated. What might I have wrong?

You not only have to add the new field to the Combo's query you also have
to increase the ColumnCount property of the ComboBox.
 
Are you feeding the form through a query instead of
directly from the table? A lot of people forget to update
a query by adding the new field to it so that the
dependent form can then "see" the new field?
 
Back
Top