Free Code Snippets in C#, Net Framework, Office 365, ASP.Net,WPF, Visual Studio, SQL Server, Antivirus free
#

 

 

Question:

How to update a list box or drop-down list in Microsoft Access.

There is no Requery or Reload as a function.

 

Solution:

You have to load the RowSource of the control again with yourself.

 

Example:

Private Sub ctlRaum_AfterUpdate()

    ctlRaum.RowSource = ctlRaum.RowSource

End Sub

 

Task:

If you have a dropdown list in Access and enter a new entry, then the list should automatically be extended with this value and the entry added to the selection list.

 

After changing to another data record or after entering the previous element, the new entry is available

 

To do this, the row source of the control element must be renewed.

This setting can be found under Control-> Properties-> Data Source or Row Source

Row Source= SELECT tbl_Projekte_Positionen.Raum FROM tbl_Projekte_Positionen

GROUP BY tbl_Projekte_Positionen.Raum ORDER BY tbl_Projekte_Positionen.Raum;

 

To update automatically you have to enter it in the event: after updating (after update)

 

Private Sub ctlRaum_AfterUpdate()

    ctlRaum.RowSource = ctlRaum.RowSource

End Sub

 

Combo box, combo box

 

Mobile
»
MS Access: Automatic updating of a dropdown list

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de