Forum Discussion
Brilliant! Thanks, Mark.
I did need to tweak it a bit. I changed var text RID to var number RID and removed the %%rid%%. And of course, I did some formatting changes. But it works perfectly!
------------------------------
Barry Dolan
------------------------------
The %%rid%% is used for a new record, in add record mode. If you remove that portion, this button will only work after it has been saved the first time, and the record ID exists.
I've tried Marks code before (with the %%rid%%) and it has worked great for me. I recommend keeping that part in, and posting back the error you are getting (if you are getting one).
------------------------------
Mike Tamoush
------------------------------
- BarryDolan2 years agoQrew Cadet
OK, good advice.
Here's the error.
I changed the var from text to number but get the same error.
------------------------------
Barry Dolan
------------------------------- MikeTamoush2 years agoQrew Commander
Keep it as a text variable. Mark just forgot to Make his Record ID text. Variable should look like this:
var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
------------------------------
Mike Tamoush
------------------------------- BarryDolan2 years agoQrew Cadet
OK, it's working right now. I see the difference now.
Thank you both very much!
------------------------------
Barry Dolan
------------------------------