Andy_CD
Bumbling Idiot
- Local time
- Today, 19:19
- Joined
- Feb 6, 2017
- Messages
- 23
Hi,
I have used this to code to open a new form keeping the details of one of the fields:
Private Sub Command48_Click()
Const cQuote = """"
Me!Cost_Centre.DefaultValue = cQuote & Me!Cost_Centre.Value & cQuote
DoCmd.GoToRecord , "Form Label BRI", acNewRec
End Sub
It works perfectly, however I want two other fields to behave in the same way any ideas?
I have tried this
Private Sub Command48_Click()
Const cQuote = """"
Me!Cost_Centre.DefaultValue = cQuote & Me!Cost_Centre.Value & cQuote
Const cQuote = """"
Me!Patient_Name.DefaultValue = cQuote & Me!Patient_Name.Value & cQuote
Const cQuote = """"
Me!Hospital_Number.DefaultValue = cQuote & Me!Hospital_Number.Value & cQuote
End Sub
But it freaked out at me trying to set another constant.
Any ideas peeps???
I have used this to code to open a new form keeping the details of one of the fields:
Private Sub Command48_Click()
Const cQuote = """"
Me!Cost_Centre.DefaultValue = cQuote & Me!Cost_Centre.Value & cQuote
DoCmd.GoToRecord , "Form Label BRI", acNewRec
End Sub
It works perfectly, however I want two other fields to behave in the same way any ideas?
I have tried this
Private Sub Command48_Click()
Const cQuote = """"
Me!Cost_Centre.DefaultValue = cQuote & Me!Cost_Centre.Value & cQuote
Const cQuote = """"
Me!Patient_Name.DefaultValue = cQuote & Me!Patient_Name.Value & cQuote
Const cQuote = """"
Me!Hospital_Number.DefaultValue = cQuote & Me!Hospital_Number.Value & cQuote
End Sub
But it freaked out at me trying to set another constant.
Any ideas peeps???