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
|
|||
|
|||
Text box on forms
I have a very simple form with a text box and a command button. When I
open the form for the first time the text box is empty. I enter "Peter" I click on the command button and the form closes. When I open it again the text box should read "Peter". I can then enter "Mike" and click on the command button. The next time I open the form I want it to read" Mike". I want the text box to show me the last value entered by the user. I have tried Private Sub Commande2_Click() varpath = txbPath txbPath.DefaultValue = varpath DoCmd.Close acForm, "frmStart", csaveyes Call proBysection End Sub and it doesn't work |
#2
|
|||
|
|||
Text box on forms
The easiest way is to have the form bound to a small table with just one
record and one field. Have the textbox bound to your field. Make sure you disable the navigation buttons on the form. When you enter a value, it will get saved in the table ready for the next time. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L wrote in message ups.com... I have a very simple form with a text box and a command button. When I open the form for the first time the text box is empty. I enter "Peter" I click on the command button and the form closes. When I open it again the text box should read "Peter". I can then enter "Mike" and click on the command button. The next time I open the form I want it to read" Mike". I want the text box to show me the last value entered by the user. I have tried Private Sub Commande2_Click() varpath = txbPath txbPath.DefaultValue = varpath DoCmd.Close acForm, "frmStart", csaveyes Call proBysection End Sub and it doesn't work |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Newbie Looking for Help | Little Penny | Using Forms | 6 | December 27th, 2005 08:33 PM |
Newbie table Layout (Posted as suggested by Tom Lake for feedback) | Little Penny | Using Forms | 2 | December 25th, 2005 04:44 PM |
Add New Field to DB | Karen | Database Design | 7 | October 19th, 2005 08:03 PM |
Query for 'confirmation' | rogge | Running & Setting Up Queries | 8 | April 19th, 2005 03:26 PM |
Access reports with a horizontal line after each record??? | Bill via AccessMonster.com | Setting Up & Running Reports | 6 | March 9th, 2005 04:51 PM |