list box click command

  • Thread starter Thread starter msmuzila
  • Start date Start date
M

msmuzila

Is there a vb command that simulates a list box click. I have a list
box that generates some data that is used in a report, but unless i
actually click on the list box, the information is null.


Thanks
Matt
 
Hi

I assume that the list is populated after some other control is changed.
Instead on of the OnClick of the list you could populate the list AfterUpdate
of the other control.
Or set the event to OnGotFocus of the list if you need to select a row.
 
The list box (MS6) populates from the following code in the row
source:

SELECT TOP 1 Part_Start.Part, Part_Start.Part, Part_Start.[Start
Date], DateDiff('d',Now(),[Start Date]) AS dd FROM Part_Start GROUP BY
Part_Start.[Part #], Part_Start.Part, Part_Start.[Start Date],
DateDiff('d',Now(),[Start Date]), Part_Start.Not_On_Inventory,
Part_Start.Special_Order, Part_Start.Type HAVING (((DateDiff('d',Now(),
[Start Date]))>=180) AND ((Part_Start.Not_On_Inventory)=No) AND
((Part_Start.Special_Order)=No) AND ((Part_Start.Type)='mill')) ORDER
BY Part_Start.[Start Date]


But when i do a MsgBox(MS6), the value is null. If i click on the list
box and then do the msgbox, then it shows the value in MS6. I need a
way to code the click action so that i do not need to do this when i
need the information in MS6

Thanks
Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top