Data missing in Table Problem

MiAs

Registered User.
Local time
Today, 06:56
Joined
Oct 25, 2004
Messages
49
I have a Combobox on a Form reading from a Query, which autopopulates a textbox: =[MyCombo].Column(1)
This works fine on Form but data from textbox is missing in Table & Query.

Combobox has Row Source from another Table,if I change this Row Source to the Query the Combobox data is messed up.

Suggestions please.
 
I take it that you see the data populated in the text box.
Have you tried saving the record after the text box is populated?
 
Yes the data is entered in the textbox but not in the table,everything else entered.
Tried saving but no luck.
 
Data

Check if the text box is unbound.
In design view, on the data tab, if there is nothing in the
Control Source the value will not be saved.
It needs to be set to the appropriate field of the query/table.
 
Last edited:
Textbox control source is:
=[MyCombo].Column(1), reading from a second Table which is updated daily,
is this workable?
 
Last edited:
Txt Box

I think the Data Source of the Textbox should be the field from the query/table you want the value to be saved in.

Then, in the After Update Event of the combo box put:

Me.textbox = MyCombo.Column (1)
 
Me.textbox = MyCombo.Column (1)

Does this require a macro?
 
No

No, just put it in the After Update Event of the combo box.

Replace 'textbox' with the actual name of the field you want to populate and
'MyCombo' with the name of the combo box.
 
The 'After Update' event prompts for a macro.
Could it be a relationship problem?
 
Code

Open the form in Design View, select the combo box, go to properties, on
the Event Tab go to After Update.
When you click in there, a little button with 3 dots appears on the
right hand side. clicking it opens a box, select Code Builder and click OK.
It takes you to the code window.
The first and last line of the code are already there.
Just put the code I gave you between those lines, save the code,
and that's it.
 
Cheers,
That did the trick!
A little late now here in the UK,
time for sleep.
 

Users who are viewing this thread

Back
Top Bottom