Beste,
Beetje ten einde raad, ik heb access vernieuwd 2007 naar 2013, alles werkt tereug naar behoren op een functie na.
unction macro10()
On Error GoTo macro10_Err
With CodeContextObject
DoCmd.GoToControl "2"
If (IsNull(.[2])) Then
DoCmd.GoToControl "art prijs"
End If
If (IsNull(.[2])) Then
Exit Function
End If
DoCmd.GoToControl "2"
DoCmd.RunCommand acCmdCopy
DoCmd.GoToControl "art prijs"
DoCmd.RunCommand acCmdPaste
End With
macro10_Exit:
Exit Function
macro10_Err:
MsgBox Error$
Resume macro10_Exit
End Function
"
Het lijntje " DoCmd.RunCommand acCmdPaste " doet het niet, als ik dan zelf control v druk staat mijn waarde in mijn veld, dus enkel het "plakken" wordt niet uitgevoerd.
Dat werkt reeds vele jaren vanaf access 98 en is steeds meegegroeid zonder problemen, tot op heden.
Ik vermoed dat het iets met de "focus" te maken heeft maar kan geen code schrijven die werkt, heb al vanalles geprobeerd.
Beetje help zou zeer welkom zijn.
MVG
Geert
Beetje ten einde raad, ik heb access vernieuwd 2007 naar 2013, alles werkt tereug naar behoren op een functie na.
unction macro10()
On Error GoTo macro10_Err
With CodeContextObject
DoCmd.GoToControl "2"
If (IsNull(.[2])) Then
DoCmd.GoToControl "art prijs"
End If
If (IsNull(.[2])) Then
Exit Function
End If
DoCmd.GoToControl "2"
DoCmd.RunCommand acCmdCopy
DoCmd.GoToControl "art prijs"
DoCmd.RunCommand acCmdPaste
End With
macro10_Exit:
Exit Function
macro10_Err:
MsgBox Error$
Resume macro10_Exit
End Function
"
Het lijntje " DoCmd.RunCommand acCmdPaste " doet het niet, als ik dan zelf control v druk staat mijn waarde in mijn veld, dus enkel het "plakken" wordt niet uitgevoerd.
Dat werkt reeds vele jaren vanaf access 98 en is steeds meegegroeid zonder problemen, tot op heden.
Ik vermoed dat het iets met de "focus" te maken heeft maar kan geen code schrijven die werkt, heb al vanalles geprobeerd.
Beetje help zou zeer welkom zijn.
MVG
Geert