Refresh Combo after load - what syntax

mik

Lost in a VBA Jungle
Local time
Tomorrow, 02:52
Joined
Nov 16, 2004
Messages
22
Hi, I have a form that uses an unbounded combo to display a summary of what is loaded. It runs a simple sql query to produce the summary.

A separate button on the same form runs a vb script that loads to the table.

What syntax should be added to then end of the load vb script to update the combo?
 
Set the combobox rowsource:

Me!cboName.RowSource = "Select 'whatever

Be sure that all combobox properties have appropriate values, esp. Column Count, Column Width, Row Source Type, etc.
 
Thanks llkhoutx,

I'm nearly there, can you help with the following error message

The record source 'Me!Files_Already_Loaded.RowSource = "Select......' specified on this form or report does not exist

( :confused: How do you upload pictures?)
 
Last edited:
What about Me.ComboList.Refresh? or is it .Requery? I can never remember! One of them should work.
 
You jpg doesn't display and you didn't specify the complete SQL. Please clarily.
 
Hi llkhoutx,

The SQL was the origional SQL that populated the combo box, it was a simple aggregrate query, something like (Have actual code at work)

Select FileName
from Summary_Query
order by Load_Date Descending

And Summary_Query is somthing like

Select Sum(SMS_Quantity), FileName, Load_Date
from Summary_Table
Group by FileName, Load_Date
Order by Load_Date descending

Picuture was a screen dump of the error. Sorry don't know how to upload the pictures.

reclusivemonkey, Do I put the line Me.ComboList(.Refresh? or is it .Requery) at the end of my load script? Do I replace ComboList with the name of the unbounded combo box - (Me.Files_Already_Loaded.Refresh or Me.Files_Already_Loaded.Requery).
 
Got the combo to requery

Thanks Guys, the combo now refreshs.

Solution was to add Me.Files_Already_Loaded.Requery (where Files_Already_Loaded is the name of the combo box) to the end of the load script.
 

Users who are viewing this thread

Back
Top Bottom