Pre-defined values to be inputted into the table through a form!!!

  • Thread starter Thread starter Richard C
  • Start date Start date
R

Richard C

I solved my first problem, but now Im unsure about the 2nd
bit!!

I was trying to create a Task Template. What I want for
some pre-defined tasks is the information about the task
locked in and then allow the user to enter the remaining
information. How would you do that? I have a simple task
adder form, that allows the user to input all the data in,
such as Task Name, Task Outline, deadline and who the task
is assigned to. I want to create a template for regular
tasks, so the Task Name, Task outline and who it is
assigned to is already pre-set, all the user has to do is
alter the date deadline.

How would you do that? Would you have table with the
regular tasks in, or is there something that could lock
the txt you set in the form, then when the user hits save
that infomation is put in the task fields?

Any help and advice would be cool!!

Rich
 
Richard,

There are several things you can do to control what the user can/can't make
entries into. Check the following Properties:

Forms:
Allow Additions
Allow Edits
Allow Deletions
Data Entry

Controls:
Default Property
Locked
Enabled (this can work w/ Locked for a different effect)

Also, you can use the BeforeUpdate event of the form to place a value, such
as the current date/time, in a control before saving the record.
 
I have looked at those functions, but I dont see how I can
use them to get what I want. For Example I want to create
a Template. e.g.

Task Name: Contact CompanyX Operations Manager
Task Outline: Need to contact the operations Manager in
order to get them to help with our joint venture!!!
Assigned to: Richard C
Date Deadline: The user will input that info of the
deadline.

All the other fields have the information already there.
But how do you get that infomation in there? Do I require
a Table with that information, where it get that data from
and then forwards it into the main Task monitor table? If
so how do how do you do that? If there is another way,
what is it?

Richard C
 
Ok, I think I have a little clearer picture of what you're trying to do.
This will vary some depending on When you want to do it. Whether it is as
you enter data or when you move from one existing record to another.

For the first option, you would do this in the AfterUpdate event of the
control that you are basing the value on. For example, if I want textbox A
to say Hello when I enter the value 2 in textbox B, I would use the
AfterUpdate event of textbox B to place the value in textbox A.

Example:
If Me.txtB = 2 Then Me.txtA = "Hello"

To do this as you move from one existing record to another, put the line
above in the form's Current event.

Now, if you have predetermined responses, one of the easiest ways to do this
may be to set up a table with two fields. The first field would be the value
of "txtB" and the second field would be the response you want to show in
"txtA" for that value. You would then use DLookup in the example above to
retrieve the text value associated with the entered value. If the value will
always be the same, I don't recommend adding it to the table underlying your
form, just look it up when you need it.

Another way of doing this, would be a calculated control. This is probably
the better way, but you won't be able to bind the textbox to the field in
the underlying table if you do this. However, since you really shouldn't
store this value anyway, it is faster. To create the calculated control, you
would set the control's Control Source to

Example:
=DLookup("[TextField]", "[ResponsesTable]", "[ValueField]=" & txtB)
or, if txtB is text instead of a number
=DLookup("[TextField]", "[ResponsesTable]", "[ValueField]='" & txtB & "'")
 
Back
Top