If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to clear the previous data
I create a new form with properties Data Entry, Allow Additions/Delete/Edits
= Yes. I creat some combo boxes to capture the data and to show them to the users on text boxes (so users don't have to type in). These data are just for the showing purpose, they are not stored into the database. When I advance to the next record, these data are still there even though I created a button with the GotoNextRecord command. Can you pls show me how to clear up these data so when the users go to the new record, all fields on the form are cleared up ready for new data? Thanks for your help in advance. |
#2
|
|||
|
|||
How to clear the previous data
I'm not sure I quite understand the situation, but if you enter data into an
unbound control it will remain there until you change the data or close the form, unless you explicitly clear it. To do that you could use the form's Current event: Me.Combo1 = Null Me.Combo2 = Null Null should work, but it may be that you need to use a zero-length string (depending on how things are set up in your project): Me.Combo1 = "" As a point of terminology, fields are where data are stored in tables. Controls are text boxes, combo boxes, labels, and so forth on forms and reports. Some controls may be bound to a field in the underlying recordset (the Record Source for the form or report). These same controls may also be unbound. Some controls such as labels and boxes cannot be bound. Tim wrote: I create a new form with properties Data Entry, Allow Additions/Delete/Edits = Yes. I creat some combo boxes to capture the data and to show them to the users on text boxes (so users don't have to type in). These data are just for the showing purpose, they are not stored into the database. When I advance to the next record, these data are still there even though I created a button with the GotoNextRecord command. Can you pls show me how to clear up these data so when the users go to the new record, all fields on the form are cleared up ready for new data? Thanks for your help in advance. -- Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
How to clear the previous data
I put some codes into the form's Current event and it works! Thanks a lot!
"BruceM via AccessMonster.com" wrote: I'm not sure I quite understand the situation, but if you enter data into an unbound control it will remain there until you change the data or close the form, unless you explicitly clear it. To do that you could use the form's Current event: Me.Combo1 = Null Me.Combo2 = Null Null should work, but it may be that you need to use a zero-length string (depending on how things are set up in your project): Me.Combo1 = "" As a point of terminology, fields are where data are stored in tables. Controls are text boxes, combo boxes, labels, and so forth on forms and reports. Some controls may be bound to a field in the underlying recordset (the Record Source for the form or report). These same controls may also be unbound. Some controls such as labels and boxes cannot be bound. Tim wrote: I create a new form with properties Data Entry, Allow Additions/Delete/Edits = Yes. I creat some combo boxes to capture the data and to show them to the users on text boxes (so users don't have to type in). These data are just for the showing purpose, they are not stored into the database. When I advance to the next record, these data are still there even though I created a button with the GotoNextRecord command. Can you pls show me how to clear up these data so when the users go to the new record, all fields on the form are cleared up ready for new data? Thanks for your help in advance. -- Message posted via http://www.accessmonster.com . |
#4
|
|||
|
|||
How to clear the previous data
Glad to help. Good luck with the project.
Tim wrote: I put some codes into the form's Current event and it works! Thanks a lot! I'm not sure I quite understand the situation, but if you enter data into an unbound control it will remain there until you change the data or close the [quoted text clipped - 25 lines] clear up these data so when the users go to the new record, all fields on the form are cleared up ready for new data? Thanks for your help in advance. -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|