I wan't to make a button that displays the current record on the form in a Msgbox. I am not sure how to bind to current record in Code. I tried to use the Macro but that didn't work.
This is easily done, except you have not specified just what fields you desire to see!
Anyway in the [blue]Click Event[/blue] of a command button, do something like this:
Code:
[blue] Dim Msg As String, Style As Integer, Title As String
Msg = "YourMessage" & Me!YourField & " MoreText"
Style = vbInformation + vbOKOnly
Title = "Text for the Title Bar"
Call MsgBox Msg, Style, Title[/blue]
That was easy.
Next I want to have this button in a Subform and clicking it make the selected record (say Customer_ID field value) pasted into a current record field in my Main Form.
I can't use Me! for the current record in my Main form, sine the button is in the Subform. Can I use the CurrentRecord function? The tables are not related.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.