combo boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an unbound combo box in a form that when data is typed in (In this
case a PM Number) it pulls up all data related to that particular
number..works fine BUT now I need to figure out how to be able to add new
data to this form. I went to properties and tried setting limit to list to
"No" but it won't work. It tells me my bound field length (which is the PM ID
number) is wrong and must be changed.
unfortunatly it does not tell me changed to what. It is now 0";1" which
hides the Id Number and just shows the PM number. Any help would be greatly
appreciated. Be kind i am a newbie.
 
Your combo box is apparently set to a two column data source. If you hide
the bound column you must set the combo box to Limit to List = yes. Only if
you show the bound column can you set Limit to List = No.

Regardless, to go to a new record on the form would have nothing to do with
the combo box. You require some other method of moving to a new record.
First make sure the form data properties are set to allow additions = yes.
You can go to a new record by adding a command button with code to do so
(you can use the wizard to add this button). Use the Page Down keys to
navigate to the last record and then once more to go to a new record. Use
the record navigation buttons (if they are turned on) and click the >*
button. Scroll down using the scroll wheel on your mouse. You can even
create a custom toolbar with navigation buttons including a New button.

Your combo box will get out of synch with the new record or any other record
that is navigated to without the use of the combo box itself. If you have a
text box on the form that displays the same data as the hidden column in
your combo box, then you can add code On Current of the form to set the
combo box to equal that text box so it will stay in synch when users
navigate by any of the above means.

Tony Vrolyk
 
I have only one combo box. I don't understand what they are talking about at
that site--I do not know VB and am new at this. thx for trying, Kathy
 
I did a macro that opens the form and is supposed to go to a new record. BUT,
it still won't let me add a new record. could this have something to do with
my subform? I have PM no. and Machine name in main form and all other info in
the subform.
 
I need more info.

When you say it won't let you add a record does that mean you can go to a
new record, fill in the data but when you try to save or move to another
record it give an error? If so what does the error say.

Of does the form never go to a new record at all? If this is the case check
the Properties of the form. In design view double-click the square in the
upper right (above the left ruler and left of the top ruler). This will show
the properties if the form. Go to the data tab and make sure the Allow
Additions is set to yes. If it is, then check the data source of you form.
If you used a query it is possible to have designed the query to not allow
additions. Try viewing the query results outside the form and see of there
is a blank row at the bottom. If not then the query is structured in such a
way to prevent additions.

Does your subform display data from the same table as you main form?
Subforms are usually used to display data in a separate (but related) table
to the data being shown in the main form.

Can you tell us what are you table names and which ones are displayed in
which form.

Tony
 
Thanks for the offer of help, but found an easier way to do this...just made
a second form with 2 fields. add PM and machine, then go back to main form to
add rest of data.
Regards,
Kathy
 
There is no reason you couldn't enter all the data on one screen if it is
setup correctly, but if that works for you then more power to you.
 
Tony (or anyone please) - I am having the same issue where Limit to List =
No and the bound column cannot be hidden. I may be using the wrong control
for my need:

Issue: I am doing this in a sfrm; default view=continuous forms - result is
a many to one with the record selected on the parent form. The ID or Key is
written to the table so this needs to be the bound column.

In the query for the source row I need to list only the records where
Active=true in the lookup table. When I do this, any inactive records that
could have been previously selected will not display any more in the sfrm. I
need the inactive records to display as the data is still needed; I just do
not want the users to have the opton to select an inactive item from the list.

I would prefer limit to list = yes - this is not a free form entry field.

Thanks!
S
 
Back
Top