edo janssen
Registered User.
- Local time
- Today, 16:24
- Joined
- Oct 29, 2010
- Messages
- 16
I have a form with a subform. On the mainform I have some buttons. When I select a record on the subform and then I push a button on the mainform I want the record on the subform be updated with the data I put into the inputbox.
Below the code I already have to update the record on the subform. But unfortunately it doesn't work. Who can help me out with this?
Below the code I already have to update the record on the subform. But unfortunately it doesn't work. Who can help me out with this?
Code:
Dim Message, Title, sInputW, sPercEigId
Message = "Voer de wijzigingsdatum in (dd-mm-jjjj)."
Title = "Wijzigingsdatum" ' Stelt titel in.
sInputW = Inputbox(Message, Title)
sPercEigId = Forms("frmPerceelEigenaar").Controls("sfrmPerceelEigenaar").Form.Controls("PerceelEigenaar_id").Value
'MsgBox "Test " & sPercEigId
CurrentDb.Execute "UPDATE dbo_PerceelEigenaar SET dbo_PerceelEigenaar.Wijzigingsdatum = #" & sInputW & "# WHERE dbo_PerceelEigenaar.PerceelEigenaar_id= '" & sPercEigId & "';"
Last edited: