Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forced Entry In Form

Status
Not open for further replies.

amourdevin

Technical User
Sep 7, 2003
21
US
Is there a way to force the user to enter a new value in a form even if there is preexisting data? It would be OK for the user to enter the same information (confirm the preexisting data) but I want to force the user to enter something.

Thanks in advance!
 
Hi
Do you want the user to enter data in a particular field or just anywhere? If it is anywhere, you could use the OnChange event of the form and a hidden field. If it is a particular field, you could do the same with the field OnChange event. If, for example, the hidden field says "No Change", The user is returned to the valid field until a change is made. It would be easier, I think, if it was a particular field.
 
How are ya amourdevin . . . . .

amourdevin said:
[blue]Is there a way to [purple]force the user to enter a new value[/purple] in a form even if there is preexisting data?[/blue]
[purple]What is your criteria for determining wether a user should do that or not?[/purple]

Calvin.gif
See Ya! . . . . . .
 
I would like the user to always be forced to enter something a particular field even if it means redundantly reentering the preexisting data.
 
Hi
How about this:

Private Sub Form_Current()
Me!HiddenField = "Unchanged"
Me!FieldToUpdate.SetFocus
End Sub

Private Sub FieldToUpdate_AfterUpdate()
Me!HiddenField = ""
End Sub

Private Sub FieldToUpdate_Exit(Cancel As Integer)
If Me!HiddenField = "Unchanged" Then
Cancel = True
End If
End Sub
 
I am admittedly near clueless.

The field I want to update is a long integer called [ToolRoomEmpID]

I will attempt to work out the syntax correctly on my own but would appreciate help (spoon feeding I suppose) if offered. If I correctly figure it out on my own, I will post that upon success.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top