access form

  • Thread starter Thread starter LUIS ANGEL
  • Start date Start date
L

LUIS ANGEL

Hello I'm trying to make a simple form that will feed a table. What im looking to do is to have a form with 2 fields; field1 and field 2.

In field1 i want to put a number and that number should stay there till i change it.
in field2 i want to put a number and after hitting <<enter>> both fields should be added to table1. after hitting enter the cursor should stay in field2 to be able to enter the next data and so forth.

any help would appreciated.
 
Hello I'm trying to make a simple form that will feed a table. What im looking to do is to have a form with 2 fields; field1 and field 2.

In field1 i want to put a number and that number should stay there till i change it.
in field2 i want to put a number and after hitting <<enter>> both fields should be added to table1. after hitting enter the cursor should stay in field2 to be able to enter the next data and so forth.

any help would appreciated.

Put code in the AfterUpdate event of Field1:

Private Sub Field1_AfterUpdate()
Me!Field1.DefaultValue = Chr(34) & Me!Field1 & Chr(34)
End Sub

Chr(34) is the doublequote character " - the DefaultValue propety must be a
text string, whatever the datatype of the table field.

Then set Field1's Tab Stop property to no, and the form's Cycle property to
All Records (that's the default).

Tabbing (or entering) in Field2 will then jump to the new record and set focus
to field2.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top