Enabling/disabling fields according to previous data entry

Malena

New member
Local time
Yesterday, 23:21
Joined
Aug 6, 2013
Messages
3
Hi, friends! I am a beginner in Access and I am not a programmer, so please bear with me. I need to create a form to enter data from a survey, and ideally some sections of the form would only be completed when the answer to a first question is "yes". Do you have any suggestions on how to do this enabling/disabling of fields for data entry? Thank you!

PS: I would appreciate Access-for-dummies-styled answers :)
 
In the past i've used data validation visual basic macros connected to the form so that when you press submit it looks at the fields and makes sure you haven't completed any you shouldn't based on those you have completed. Let me know if this is something you're interested in and we'll take a look.
 
Hi, Onyx175, thanx for your reply. I am open to your suggestions. I was thinking of something like "graying" out of fields until a key field is filled out, or something of the sort. We are hiring soneone else for data entry so it should be as easy and as error-proof as possible.
 
Hi, Onyx175, thanx for your reply. I am open to your suggestions. I was thinking of something like "graying" out of fields until a key field is filled out, or something of the sort. We are hiring soneone else for data entry so it should be as easy and as error-proof as possible.

Here's the visual basic code I used (or a variation of) for one of my databases. When the user clicks 'submit record', the form will check that the boxes that should be completed are completed

Code:
Private Sub Command37_Click()
'Define error
Dim error As Integer
  
'If 2009 tax box is empty and 2009 option box is populated then produce error message and end code
   If Len([2009 tax] & "") = 0 And [2009 Option] = "documents sold" Then
   MsgBox ("2009 - documents sold must have tax details input")
   error = 1
   End If
'This is where the errors go
If error > 0 Then
Call Closeit
'If there are no errors, add new record and confirm the user was succesfull
Else
   DoCmd.GoToRecord , , acNewRec
   MsgBox ("Record added")
   End If
Sub Closeit()
End Sub
 

Users who are viewing this thread

Back
Top Bottom