Goto Last Record that is not "None"

Mile

I just did this on a label

Private Function Label1524_Click()

Me.RecordSource = "MFormPreC"

End Function

But when i go to open the form it wants a parameter for the tables ID field and then comes up with

Event procedure declaration does not match description of event having same name. The form has two subforms and a macro OnCurrent with several action and conditions lines for Visible

On another form (based on the same table and opened from MasterForm) I have heaps and heaps of label with OnClick for some code I made to open spwecific Word docs and then paste a lot of Access values into Bookmarks. These also has the same problems if I put the on Masterform.

Mike
 
Private Sub; not Private Function
 
Mile-O-Phile said:
Private Sub; not Private Function

Private Sub Label1524_Click()

Me.RecordSource = "MFormPreC"

End Function

Success was achieved. :D

That is quite interesting. On the other form when you do three ... deal for code it defaults to Sub whereas the other goes to Function.

This is my first coding apart from about 50 of these

Private Sub Label309_Click()
DoCmd.RunMacro "Macro340", , ""
DoCmd.RunMacro "Macro11", , ""

Const MSTB_MSWORD = 300&

Application.Run "utility.util_StartMSToolbarApp", MSTB_MSWORD

Dim docName As Object
Set docName = CreateObject("Word.Basic")

docName.FileOpen "c:\Letters\0Letter1Mike.doc"
docName.EditGoTo "a2"
docName.EditPaste

DoCmd.RunMacro "Macro11Street", , ""
docName.EditGoTo "a3"
docName.EditPaste

and about another 40 run macro down the page then a print out, copy the doc and paste bacl to an Access memo field etc
 

Users who are viewing this thread

Back
Top Bottom