Form Template Idea

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a grand idea for a form but no idea how to design it!

I have form that has perhaps 8 - 10 fields that require filling in. The
nature of the data is that, for any given day of data entry, perhaps 6 of
those fields would be the same (ie the user would pick the same choice) for
each record.

What i envisage is that at the beginning of data entry you could somehow
pre-choose some of the repsonses and have those recorded to the form allowing
the user to only enter 2 or three fields that are different for each record.
Kind of like setting a template for the day. However the user would have to
be able to over-ride those pre-choices when it came to each record.

Also, it would be good if you could have a way of re-setting all or any of
the choices made say by hitting a reset button; similarly that the choices
would be reset at the beginning of the next day.

How would one go about this grand project!!
 
crtopher said:
I have a grand idea for a form but no idea how to design it!

I have form that has perhaps 8 - 10 fields that require filling in. The
nature of the data is that, for any given day of data entry, perhaps 6 of
those fields would be the same (ie the user would pick the same choice) for
each record.

What i envisage is that at the beginning of data entry you could somehow
pre-choose some of the repsonses and have those recorded to the form allowing
the user to only enter 2 or three fields that are different for each record.
Kind of like setting a template for the day. However the user would have to
be able to over-ride those pre-choices when it came to each record.

Also, it would be good if you could have a way of re-setting all or any of
the choices made say by hitting a reset button; similarly that the choices
would be reset at the beginning of the next day.


An easy way to get this effect is to take any value the user
enters and use it as the default value in any new records.
All you need is a line of code in each control's AfterUpdate
event procedure;

Me.controlname.DefaultValue = """" & Me.controlname & """"
 
OK thanks for the info Marshall. So i put this code in for the combo box (in
his case cboSurgeon):

Private Sub cboSurgeon_AfterUpdate()
Me.cboSurgeon.DefaultValue = """" & Me.cboSurgeon & """"

End Sub


But nothing happened! Why are there sooo many """" 's ?

I also wonder if this will reset when the form is closed?

I appreciate your time. Thank you
Chris
 
You will not see an effect unless you look at the new record
on the form.

The quotes are needed because the DefaultValue property is a
text string expression. If the quotes were not there, you
could get an error if the value is not a valid expression.
This is actually a fairly complex topic that is best left to
another discussion.

Finally, Yes, these settings will vanish when the form is
closed.
 
Marshall I sincerely apologise. It works perfectly and vanishes when the form
closes. it's brilliant. Thank you again.

Chris

Marshall Barton said:
You will not see an effect unless you look at the new record
on the form.

The quotes are needed because the DefaultValue property is a
text string expression. If the quotes were not there, you
could get an error if the value is not a valid expression.
This is actually a fairly complex topic that is best left to
another discussion.

Finally, Yes, these settings will vanish when the form is
closed.
--
Marsh
MVP [MS Access]

OK thanks for the info Marshall. So i put this code in for the combo box (in
his case cboSurgeon):

Private Sub cboSurgeon_AfterUpdate()
Me.cboSurgeon.DefaultValue = """" & Me.cboSurgeon & """"
End Sub


But nothing happened! Why are there sooo many """" 's ?

I also wonder if this will reset when the form is closed?

I appreciate your time. Thank you
Chris
 
Back
Top