Refresh cbo after import? (1 Viewer)

Steven.Ashby82

Registered User.
Local time
Today, 06:35
Joined
Jan 14, 2013
Messages
63
I've made some changes to the why my form displays data and as a result the form is currently showing blank on two of the cbo i have changed. The data is correctly in the table though. Is there a way of telling the form to refresh to display that data from the same field in the table or do I have to reselect each of the 200 entries?
 

pr2-eugin

Super Moderator
Local time
Today, 06:35
Joined
Nov 30, 2011
Messages
8,494
Hello Steven, I am a bit lost in your description, do you mean to say you have made design changes to your Form? If you just want the Combo Boxes to refresh either you can use.. Me.comboBoxName.Requery Or if you wish the Whole form to refresh use Me.Refresh..
 

Steven.Ashby82

Registered User.
Local time
Today, 06:35
Joined
Jan 14, 2013
Messages
63
Sorry Paul,
Yes I've changed the form from being a text box to a cbo, the record data is still the same though.
I was hoping the data from the table would sync with that of the cbo?
 

pr2-eugin

Super Moderator
Local time
Today, 06:35
Joined
Nov 30, 2011
Messages
8,494
Change the control source of the combo box to the field name in the table the form is bound to..

Me.Refresh and Me.<controlname>.Requery are more sort of a data modification methods rather than design.. I suggested them because I was not sure what you were tryin to do..
 

Steven.Ashby82

Registered User.
Local time
Today, 06:35
Joined
Jan 14, 2013
Messages
63
Hi Paul, they already are. the only thing I can see being the issue is that the cbo fields are now part of an address book but I would have thought it would still be possible.
 

pr2-eugin

Super Moderator
Local time
Today, 06:35
Joined
Nov 30, 2011
Messages
8,494
I do not understand, Are you saying that the RowSource of the Combo box is Address Book and the Control source is still the field you wish to be updated/shown as? If so see the Column Count, Column Widths for more information..

PS: If possible post a screenshot of the Data and Format tabs of the Combo box..
 

Steven.Ashby82

Registered User.
Local time
Today, 06:35
Joined
Jan 14, 2013
Messages
63
Thanks Paul I've attached screenshots which will hopefully explain more
 

Attachments

  • prop.png
    prop.png
    15.9 KB · Views: 72
  • format.png
    format.png
    25 KB · Views: 73

pr2-eugin

Super Moderator
Local time
Today, 06:35
Joined
Nov 30, 2011
Messages
8,494
Okay the Bound Column is Column 1, and the column widths are setup as 0cm and 2.54 cm, which means the value that it will save to the table would be the ID.. and only based on the ID value in the table it will be able to display the appropriate Text...

I believe before this combo box all data stored inside 'HostedBy' field were text, i.e. name of the person who hosted the event.. So either

(a) Update the Text to the appropriate ID and change the type of this field to Number.. (IMO the best thing to do)
(b) Change the Row Source of the combo box as
Code:
SELECT [Contact Name], [ID] FROM .....
and make changes appropriately.. Hope this makes sense..
 

Steven.Ashby82

Registered User.
Local time
Today, 06:35
Joined
Jan 14, 2013
Messages
63
If I try and change the field type then it deletes all the records. Everything is now displayed correctly in the table it just won't detect the values in the table on the form
 

pr2-eugin

Super Moderator
Local time
Today, 06:35
Joined
Nov 30, 2011
Messages
8,494
Okay I think I am missing something here.. Did you first update the field with numbers first before performing the Change of field types..
 

Users who are viewing this thread

Top Bottom