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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions about controlling form fields

Status
Not open for further replies.

Champy1

Technical User
Sep 28, 2001
3
US
Hi...

Have a couple of questions...

1) I have a form to enter a nonconformance. It is given an issue date. There is also a field for the response due date. Can I make the response due date automatically fill in a date based on the issue date (say, two weeks later)? Is so, How (i'm really new to the programming aspect of things!!)

2) On a second form, can I set a control on a field so that data can only be entered if the previous field contains certain charcters? (Example, if the Op# field contains a '70*', then I need to enter the Inspector ID, but if it contains any other operation, I don't need the Inspector field and it can remain inactive.)

Any ideas would be great!! Thanks in advance.

I just want to let all of you know that you've greatly helped me with all my questions so far!!! I have learned SO MUCH from all of you...you've made my life a heck of a lot easier!!! S-)

Dawn
 
for #1 on the field where issue date is entered use code similar to the below in the after update event

me.duedate = dateadd("w",2,me.issuedate)

for #2 again using the after update event for 0pnumber(I use number because it is not good to Use the # in a field name)

if me.opnumber = 70* then
me.inspectorid.enabled = true
me.inspectorid.setfocus
end if

in the froms on current event place

me.inspectorid.enabled = false


good luck

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top