After the suggested RunCommand line, add: Me.PersonalID = Null
-- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"JezLisle via AccessMonster.com" <u43150[ at ]uwe> wrote in message news:8d2c2b7274eb0[ at ]uwe...
[Quoted Text] > Thanks, > > I have a form which is bound apart from the PatientNo which I input via an > input box. > > does that make a difference? > > The Me.TextBox = "" seems to work fine, it is just the PatientNo TextBox > which is unbound, how can I clear this to then input a new number? > > > Allen Browne wrote: >>If this form is bound to a table or query, perhaps you could just move it >>to >>a new record with: >> If Me.Dirty Then Me.Dirty = False >> RunCommand acCmdRecordsGotoNew >> >>If you don't want to save the record, perhaps you could undo the current >>edits: >> Me.Undo >> >>If it is unbound, it would probably be better to assign Null rather than a >>zero-length string, e.g.: >> Me.PersonalID = Null >> >>If you are still stuck, comment out all lines but one, and see if the >>error >>occurs. Repeat with different lines in, until you pin down the problem >>one. >> >>>I am using this code at the end of my routine that once all data has been >>> updated in the table it then clears all values from the TextBox's or >>[quoted text clipped - 15 lines] >>> in >>> TextBox's or Combo's on the form?
|