I have a form with bound and unbound fields. When I do a command to go to a new record: DoCmd.GoToRecord , "", acNewRec my unbound fields disappear. Is there a way to keep my unbound fields and only go to a new record with my bound fields?
I have a form with bound and unbound fields. When I do a command to go to a new record: DoCmd.GoToRecord , "", acNewRec my unbound fields disappear. Is there a way to keep my unbound fields and only go to a new record with my bound fields?
You save them to variables and repopulate them from the variables when adding a new record?
You mean save them to table then repopulate?
No, just save to form/global variable or TempVars and then repopulate.
If you want them as a sort of default for a user, then yes, save them to a table.
If not that, then you just need to hold on to them when your created a new record as you can reuse from that new record, as one or two might have changed?
HTH
You have a link on how to do that?
strFirstName needs to be defined?
Got it. Works great. Thanks. To remove the TempVars?
TempVars!RemoveAll?
TempVars.RemoveAll
Thanks
You should *ALWAYS* have Option Explicit at the top of every module. That can be set automatically for new modules in VBA window options Require Variable Declaration.
You will need to add it for any existing modules if that is not set.
Then Access will tell you if any are missing/misstyped.
HTH