Autofill text box

  • Thread starter Thread starter Niall
  • Start date Start date
N

Niall

I am looking to create a textbox that is automatically
filled in everytime a value is changed on a combo box on
the same form. Any ideas?
 
What do you want to fill it with?


I am looking to create a textbox that is automatically
filled in everytime a value is changed on a combo box on
the same form. Any ideas?
 
It depends what you want to fill in and if you want the
item stored to a table field. Except for time-sensitive
information, such as the current price of a product, you
generally want to avoid redundantly storing data or
calculations that you can retrieve or calculate faster in
a query without wasting disk space and risking subsequent
changes that compromise your data.

If you just wish to display additional fields from the
combo box Row Source, you can either:

- base your form on a query. When the key field is
selected in the combo box, other fields will display.

or

- include all fields you wish to display in the Row
Source, setting their width to 0" if you don't want them
to display in the combo box itself. Then set the Control
Source using the combo box' Column property:

= YourComboBox.Column(ColumnNumber)

ColumnNumber is numbered 0,1,2, etc.

HTH
Kevin Sprinkel
 
I have a table called references which has a referenceCode
and referenceDescription. On the form the combo box has
the referenceCode. When I select a particular
referenceCode form the list I want the referencDescription
text box to automatically fill in, and change whenever I
change the referenceCode.
 
You would need code similar to the following in the the AfterUpdate event of
the combobox...

Private Sub SomeComboBox_AfterUpdate()
On Error Resume Next

With Me!SomeComboBox
If Not IsNull(.Value) Then
Me.Recordset.FindFirst "ReferenceCode=" & .Value
End If
End With

End Sub




I have a table called references which has a referenceCode
and referenceDescription. On the form the combo box has
the referenceCode. When I select a particular
referenceCode form the list I want the referencDescription
text box to automatically fill in, and change whenever I
change the referenceCode.
 
I want to do the same thing but insert in text box the
current date when a selection of "signed" is choosen in a
list Box... Any ideas
 
In the AfterUpdate event of "Signed",

Me!YourDateTextBoxName = Date()

HTH
Kevin Sprinkel
 
Back
Top