RonnieODIN
Registered User.
- Local time
- Today, 01:18
- Joined
- Jun 15, 2012
- Messages
- 46
Hi all,
I am very new to Access and having trouble regarding some code in my DB.
I am trying to open a certain record on a form when clicking a button. As I understand the help function I should be able to use the follosing code - at least that is what I have:
Private Sub cmdRetKomponent_Click()
Dim strKomponentID As String
Select Case KtlFane45
Case 0
strKomponentID = Forms![frmInfoMaskiner]!UnderordnetObjekt76![KomponentID]
DoCmd.OpenForm "frmKompPLC", , , "KomponentID=" & strKomponentID, , acDialog
Anyone having an idea of what I am missing?
For info the form I need to open is frmKompPLC as dialog. I need to sort the records by KomponentID which must be equal to the KomponentID on the subform UnderordnetObjekt76 on the main form frmInfoMaskiner.
What I am getting is the attached pictures for using and leaving out the WHERE-condition for filtered and unfiltered respectively.
It seems like that my old posts are in fact filtered but I am shown a new post anyway.
I am very new to Access and having trouble regarding some code in my DB.
I am trying to open a certain record on a form when clicking a button. As I understand the help function I should be able to use the follosing code - at least that is what I have:
Private Sub cmdRetKomponent_Click()
Dim strKomponentID As String
Select Case KtlFane45
Case 0
strKomponentID = Forms![frmInfoMaskiner]!UnderordnetObjekt76![KomponentID]
DoCmd.OpenForm "frmKompPLC", , , "KomponentID=" & strKomponentID, , acDialog
Anyone having an idea of what I am missing?
For info the form I need to open is frmKompPLC as dialog. I need to sort the records by KomponentID which must be equal to the KomponentID on the subform UnderordnetObjekt76 on the main form frmInfoMaskiner.
What I am getting is the attached pictures for using and leaving out the WHERE-condition for filtered and unfiltered respectively.
It seems like that my old posts are in fact filtered but I am shown a new post anyway.