Re: Newbie Questions

Tech-Archive recommends: Speed Up your PC by fixing your registry



Sorry, you also got to put in an if statement to check to see if the
checkbox is checked or unchecked. See Changes beolow
(un checked --> false)

> Private Sub CheckComply_Click()
'-----------------new code
if me.CheckComply.checked = false then
docmd.openform("MoreInformationForm")
end if
'--------------------new code
> End Sub

"Ed Warren" <eowarren@xxxxxxxxxxxxxxx> wrote in message
news:uGTMzlcmFHA.1372@xxxxxxxxxxxxxxxxxxxxxxx


> 1. When you design your 'popup' form you can go to the properties page
> and set it's properties to be Modal (keeps the focus until closed and
> popup (stays on top).
> 2. You tie that form to whatever table it needs to edit data for.
> 3. You open that form when it is required using code something like I
> provided in the earlier post. (When an event on the calling form occurs).
> E.g. You check non-compliance for an item you would add code to the
> changed event to open the popup form.
>
>
> Example
>
> on MasterForm you have a check widget: checkComply
> when this is checked false (not in compliance) you want to open the
> MoreInformationForm
>
>
>
> In design mode for MasterForm you select the checkBoxComply, go to events,
> select the click event, [Event procdeure]
>
> this will open up the vba code designer with a new subroutine created for
> your event, something like below
>
> Private Sub CheckComply_Click()
> End Sub
>
>
> You then edit it to look something like
>
> Private Sub CheckComply_Click()
>
> docmd.openform("MoreInformationForm")
>
> End Sub
>
> now when you open the MasterForm in edit mode and change the check mark
> from true to false, the popup form is opened for your editing pleasure.
>
>
> This should at least give you a place to start for your specific
> implemention. The real trick is to capture the appropriate data from the
> masterform the detail form will need to tie it all together.
>
>
> Ed Warren.
>
>
> "WillRn" <WillRn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:A9B4364E-6F0A-4D9A-9CDC-44F4FD5B2E9F@xxxxxxxxxxxxxxxx
>> Hi Ed,
>>
>> Thanks for the response. Here's how I envision it working.
>>
>> My nurse's examine charts to verify that we are complying with multiple
>> national and state standards. If they find an issue with our compliance
>> we
>> are required to perform followup on that issue. So . . .
>>
>> Nurse audits patient chart and answers that we did not comply with Issue
>> A.
>> When the nurses inputs this on the form on the initial audit, a second
>> form
>> "pops up" and takes the basic information concerning why we were not in
>> compliance.
>>
>> Later, the nursing supervision can, through a query, "batch process" any
>> occurences on a staff member by staff member basis. In other words, Jane
>> Doe
>> R.N. comes to the nursing supervisor's office. The supervisor runs the
>> query,
>> and discovers that Jane had 3 incidents where she needed to do tasks A,
>> B,
>> and C. The supervisor educates Jane, documents that Jane understands the
>> correct method, and the date the issue was handled.
>>
>> Does this help you understand my need(s)? I had been doing this through a
>> coded Excel userform but I couldn't figure out how to "batch process" the
>> followup data per employee.
>>
>> I have enough experience with VBA to figure out what to do if someone can
>> tell me where to go and what to plug in to get an Access form "pop-up"
>> when
>> needed. A vast majority of the questions answered on my audit are within
>> compliance. But once in a while, I need to capture data in a separate
>> table
>> for followup.
>>
>> I am building a test DB to convince the Administration that Access is the
>> way to go on this issue because it handles the Multi-User environment so
>> much
>> better than Excel.
>>
>> Thanks for your previous response,
>>
>> Will
>>
>>
>>
>> "Ed Warren" wrote:
>>
>>> It might help to provide a more specific example. I'm not really too
>>> sure
>>> exactly what you want to do, but I'm equally sure, it can be done, but
>>> may
>>> require developing some coding expertise. If you are familar with Excel
>>> coding you are on your way in Access VBA.
>>>
>>> Once you get the second form to 'open' you can set the form property to
>>> 'modal' and it will stay on top and will not allow the user to go
>>> anywhere
>>> else without first closing the second form. That will solve the second
>>> part
>>> of your question.
>>>
>>> For the first part:
>>>
>>> Maybe you could build a table of responses to form (or hard code the
>>> response to form. However, every time I do this I get pounded because
>>> 'they' want to change the allowed responses)
>>> e.g. Question Response DataFormToOpen
>>> 10 1 Form10_1
>>> 10 2 Form10_2
>>> 11 1 Form11_1
>>>
>>> Then in Form1's Question 10 'widget' (textbox, combobox, whatever) you
>>> can
>>> set the appropriate Event to run some code.
>>>
>>> When you exit the widget, or the widget loses focus, then open the
>>> appropriate form (you may want to use onchange or other event)
>>>
>>> If you have hard coded the response to form you can use something like
>>>
>>> case select Question10.text
>>> case 1
>>> docmd.openform("Form10_1")
>>> case 2
>>> docmd.openForm("Form10_2)
>>> end select
>>>
>>> If you use the table approach you might do something like
>>> dim FormRequested as string
>>> FormRequested = dlookup("DataFormToOpen","DataForms","[Response] = "
>>> &
>>> Question10.Text) ' find the form for the data entered
>>> docmd.openform(FormRequested)
>>>
>>> Note: ALL of the above is 'air code' so your specific code will vary.
>>>
>>> Lots of luck
>>>
>>> Ed Warren
>>>
>>>
>>>
>>>
>>>
>>> "WillRn" <WillRn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>>> news:F1687ADD-937C-4066-949C-61239051EAEC@xxxxxxxxxxxxxxxx
>>> >I am in the process of building a test database to compile the results
>>> >of
>>> > chart audits in my hospital and I have a couple of questions.
>>> >
>>> > 1. Can anyone show me (or point out a tutorial) how, a particular
>>> > answer
>>> > in
>>> > a form's control, could trigger an additional "pop-up form" that
>>> > inserts
>>> > additional data into another table and then closes when the user
>>> > closes
>>> > the
>>> > additional data form? I figure that I can just use a query for my
>>> > users to
>>> > complete the followup data posted to the additonal data table later.
>>> >
>>> > 2. Is there a method like the "Case Method" in Excel whereby an answer
>>> > on
>>> > a
>>> > control on a form could "default in" an answer on another control? I
>>> > am
>>> > not
>>> > familiar with Access VBA programming or Macros in any way shape or
>>> > form so
>>> > please be gentle!
>>> >
>>> > Thanks,
>>> >
>>> > Will
>>>
>>>
>>>
>
>


.



Relevant Pages

  • Re: Newbie Questions
    ... You tie that form to whatever table it needs to edit data for. ... > Thanks for the response. ... In other words, Jane ... >> else without first closing the second form. ...
    (microsoft.public.access.gettingstarted)
  • Re: Error 3265: Item not found in this collection
    ... NewData As Variant) As Integer ... Private Sub AssignedCAD_NotInList(NewData As String, Response As ...
    (microsoft.public.access.formscoding)
  • Re: Error 3265: Item not found in this collection
    ... NewData As Variant) As Integer ... Private Sub AssignedCAD_NotInList(NewData As String, Response As ...
    (microsoft.public.access.formscoding)
  • Re: How To Change default error messages
    ... is it possible to selectively display custom error messages for the ... > Private Sub Save_Vehicle_Click(DataErr As Integer, Response As Integer) ... >> Response = acDataErrDisplay ' Display Default message ...
    (microsoft.public.access.forms)
  • Re: Error 3265: Item not found in this collection
    ... NewData As Variant) As Integer ... Private Sub AssignedCAD_NotInList(NewData As String, Response As Integer) ...
    (microsoft.public.access.formscoding)