PDA

View Full Version : Solved: Officer Selectable Incident Forms for Police Report



twotinners
06-05-2006, 04:49 PM
Hello :hi: All:

I hope I can get pointed in the right direction by giving you all the detailed description of what I want to do.

- I have approximately 15 different department numbered forms that have been created for Word 2000. All have been created using standard form fields.

- Since the data is VERY repetitive, I created a main form that asks for the most repetitive data and is set up to populate all the other forms when present.

- My dilema is this: Can I make a UserForm with check boxes that prompts the officer to identify the type of incident so the document is only populated with forms that apply to a particular incident? (ie., 1 or 2 arrests, vehicle impoundment, personal property, towing record, etc.)Some incidents may require a particular form, others may not.

- While I want to protect the forms from user changes, I would like the officer to be able to save the new report by naming it and saving it wherever they want. The Officer will also print the completed document via a standard laser printer.

Thanks for any info you can throw my way !!!

Dave

fumei
06-06-2006, 12:35 AM
Yes. It can get complex, but it is not (in itself) that difficult.

The key is design. Make all your "forms" - and it would be a good idea to be concise in your terms - into their own Sections. OR, have each "form" bookmarked.

So say:

2 arrests FORM

Name 1:
Name 2:
Location:
Are they related?:


Drunk FORM

Name:
Conscious?
Location:

BOOKMARKS. Select everything to be included in, say, Drunk. So from the start of "Drunk Form" all the way down to the end of "Location". Insert > Tools and type in DrunkForm (all together). OK? Now that Range in the document is now identified as a chunk.

Got it? You identify all your discrete chunks as bookmarks.

Now...on your user form, you have checkboxes.

checkbox 2 Arrests Form
checkbox Drunk Form

etc

You have code that does this. Looks at each checkbox. If it is checked...go on. If it is UNCHECKED then remove that chunk. You could of course reverse the logic. Checked means take out, unchecked means keep it in. However, I would not recommend that. Most people associate a check as inclusive. However, you should of course have a text label on your userform stating explicitly what is going to happen. "Check the forms you want to use. ALL other form choices will be removed from the document."

Example:If chkDrunk.Value = False Then
ActiveDocument.Bookmarks("DrunkForm").Range.Delete
End IfCheckbox is unchecked (.Value = False), remove the bookmark.

twotinners
06-06-2006, 08:38 AM
Ok... I think I get it (There is going to be a nice learning curve here).

- One clarifying question here ... Is it possible to ENSURE that each selected form remains on its own page when printed. Will a page break do it ? I don't want the forms to break over pages.

Thanks again for the expert advice .

VB Newbie