Results 1 to 6 of 6
  1. #1
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28

    Automated form filling


    I want to complete a form and generate a group of codes based on what I've input.

    So for example, if a client is not in receipt of benefits I want a registration code recorded without having to input it myself.

    Is this possible? I am also a complete novice and don't understand most of the jargon - so please reply in idiot terms for me

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    How exactly would this registration code be generated? What determines the next registration code?

    I am also a complete novice and don't understand most of the jargon
    Forget the database jargon; what is/are the steps involved to get the next registration code?
    You can list the steps in simple English to identify WHAT the logic involves. You/someone can take the What and provide options for HOW it may be implemented in Access/vba.

  3. #3
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    On each form there are a number of questions, some are relevant to this and some are not,

    Does client have a national insurance number?
    Does client have a benefit claim in place?
    Does client have an emergency contact number?

    So if I enter No to each of these questions I would like to have a code applied to a different table along with the date of registration. The tqble would look like this

    RC1 Client has no national insurance number 10/08/21
    RC2 Client has no .... etc

    I hope this makes sense?

    At the moment I am using a subreport on the form to add the codes... it would be nice not to have to do that manually

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    Might be far better to post a stripped down copy of the db (compacted and zipped) to cut to the chase. It seems to me that something is amiss in the design because you answer a question on the form which ought to trigger a relationship between the answer and this code you want to use. Not sure if what's really needed is for that relationship to identify what is yes, what is no, or both. It may be that the related field should be an integer (-1 or 0 values) or a yes/no field as some prefer.

    BTW, it isn't clear to me if what you want is RC1, RC2, etc. or the rest of the verbiage as well.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28

    Automated form filling

    Hi - thanks for the reply and sorry for the delay.

    I have a table called Registration and Update Codes, It looks like this:

    Code Description
    RC1 Client does not have a National Insurance Number
    RC2 Client does not have a mobile phone
    RC3 Client does not have benefits in place
    RC4 Client has benefit claim pending
    RC5 Client does not have an emergency contact
    RC6 Client has changed gender

    So, when completing a the Client Information form RC1-6 codes are relevant. Ideally what I would like is for the questions on the form to be answered and for a Registration and Update Code to be automatically generated in the subform and the date of the change to be recorded. This enables me to track a client's experience throughout. If anything is updated on the completed form, again I would want a code added and the date of the update.

    I hope this makes sense? Let me know your thoughts, like I said I'm not adverse to changing things.

    Thanks in advance

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    So there are several records on the subform and each one needs to have a field where RC# needs to be entered? Then make that field a combo on a continuous subform and bind the combo to the appropriate table/field? Still not a clear picture here AFAIC. You mention registration and update codes but only show one & don't say much about where these values and records are going so I'll assume you have a handle on that.

    So the combo would store the registration code in that bound field and its AfterUpdate event could write the date to some table as well. Something like

    Code:
    Private Sub myCombo_AfterUpdate()
    Dim sql As String
    
    sql = "UPDATE tblMyTable SET CodeDate = " & Date() & " WHERE tblMyTable.RC_ID = '" & Me.RC_ID & "'"
    CurrentDb.Execute sql, dbFailOnError
    
    End Sub
    Don't copy that verbatim - begin the event by choosing it on the Event tab of the property sheet for that combo. That sql assumes RC_ID is your RC values field, but it should be an autonumber ID field instead. If you change RC1 to RC11 you have the task of propagating the new value everywhere. If it was related to an autonumber id, you'd have nothing to do after changing the value.

    I have a table called Registration and Update Codes
    Spaces and special characters in object names are not a good idea.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 09-26-2018, 07:03 PM
  2. Auto display name when filling form
    By mohiahmed in forum Forms
    Replies: 3
    Last Post: 01-22-2012, 02:35 PM
  3. automated email sent from records in form
    By hmcquade in forum Forms
    Replies: 2
    Last Post: 05-23-2011, 08:45 AM
  4. Automatically filling out a form
    By thorpef1 in forum Access
    Replies: 11
    Last Post: 01-04-2010, 07:20 AM
  5. Filling in a table via a form
    By janjan_376 in forum Forms
    Replies: 1
    Last Post: 07-06-2009, 01:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums