AfterUpdate

  • Thread starter Thread starter hanspaulhemelaar
  • Start date Start date
H

hanspaulhemelaar

Hello,

I make a database with a AfterUpdate event.
If I fill a Start date en End date, the dropdown menu must update. Sow
I write the next code, but the dropdown menu is empty, but the table
isn't empty

Option Compare Database

Private Sub Vertrek_datum_AfterUpdate()

Me.SID.RowSource = "SELECT [Standplaatsen].[SID],
[Klant_reserveringen].[Aankomst_datum],
[Klant_reserveringen].[Vertrek_datum], [Klant_reserveringen].[SID] " &
_
"FROM Klant_reserveringen, Standplaatsen " & _
"WHERE (NOT BETWEEN [Aankomst_datum] =
[Klant_reserveringen].[Aankomst_datum] AND
[Vertrek_datum]=[Klant_reserveringen].[Vertrek_datum]) AND NOT
[Standplaats].[SID] = [Klant_reserveringen].[SID]"

Me.SID = Me.SID.ItemData(0)

End Sub
 
I'm having a little difficulty following this, but I think you're trying to
say that you want a drop-down to base its data on your Start & End dates.
But after you enter the dates, your drop-down data does not display
accordingly. About right?

Try including a Requery statement, on the AfterUpdate event of the End Date
(assuming this date is entered after the Start date).

HTH

Sharkbyte
 

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