Prevent Duplicate Google Form Submissions - forms

I just built a Google Form for a registration system. I want to prevent duplicate submissions in the form but I don't want to use the option of "Only allow one response per person(Requires Login)" mainly because of the reason that it required login to a Google Account and I don't want that. I hope there could be a solution for the same using Google Apps Script but I am not much familiar with it. Hope if someone can help me out.

As far as I know, it'll be much easier to detect & remove duplicates in the results sheet, adding a column or using conditional formatting with a custom LOOKUP or MATCH formula to see if the same value is found in earlier rows/records.
At the moment, LOOKUP is giving me spurious results. MATCH works fine. I sometimes get very delayed results from conditional formatting, so I'd go for a new column with the formula (assuming email is in column A, and you're entering the formula in cell B2)
= NOT(ISERROR(MATCH(A2,A$1:A1,0)))
This will return TRUE for duplicates.

Related

Getting ID fields from the primary table into the linked table via Form

As an amateur coder for some years I have generally used sub forms when dealing with linked tables to make the transfer of ID field from primary to sub nice and simple...
However in my latest project the main form is a continuous form with a list of delivery runs (Date, RunName, RunCompleted) etc... Linked to this primary table is a delivery list containing (SKU of product, Qty etc...). I use a simple Relationship between the two tables.
Now, On the main (RUNS) form at the end of each row is a button that opens the DELIVERIES form and displays all records with matching RUNID
This is fine for displaying pre-existing data but when I want to add new records I have been using the following code attached to the OnCurrent event:
Me.RunID = DLookup("[RunID]", "tbl_BCCRuns", "RunID = " & Forms![frm_BCC_Runs_list]![RunID])
I have also used:
Forms![frm_BCC_Deliveries].Controls![RunID] = Forms![tbl_BCCRuns].Controls![RunID]
(Note: above done from memory and exact code may be incorrect but that's not the problem at hand)
Now... Both these options give me what I need however...
I find that as I am working on the database, or if you open certain forms in the right order (a bug I need to identify and fix clearly) you can open the DELIVERIES form without the filter (to view all deliveries for arguments sake) and the top entry (usually the oldest record) suddenly adopts the RUNID of the selected record back in the main form.
Now, my question is this, and the answer may be a simple "no" and that's fine, I'll move on...
Is there a better way, a way I am not familiar with or just don't know about due to my inconsistent Access progress, to transfer ID's to a form without risking contamination from improper use? Or do I just have to bite the bullet and make sure that there is just no possible way for that to happen?
In effort to alleviate the issue, I have created a Display Only form for viewing the deliveries but there are still times when I need to access the live historical data to modify other fields without wanting to modify the RUNID.
Any pointers greatly appreciated...
Since you only want to pull the RunID if the form is on a new record row, do a check to verify this is a new record.
If Me.NewRecord Then
Me.RunID = DLookup("[RunID]", "tbl_BCCRuns", "RunID = " & Forms![frm_BCC_Runs_list]![RunID])
End If
Could also consider a technique to synchronize parent and child forms when both are subforms on a main form (the main form does not have to be bound) https://www.fmsinc.com/MicrosoftAccess/Forms/Synchronize/LinkedSubforms.asp

MS Access 2007 Form Logic

This is my first post on Stack. I've been reading for a while and learned a lot. Thanks to all those who share on this site.
My office runs still runs MS Access 2007 and I was tasked with creating a database even though I had no experience doing so. I read "The Missing Manual for Access 2007", another book that I can't remember the name of, multiple posts on this site and Microsoft's and can't find the solution to what I need to do.
Issue: I want to have two fields on a form referring to the same table, each with look ups but want the second field's options to be dependent on the first. For example, I want the first field for "Region" to list options to select 1 2 3 or 4. If someone chooses 1, I want the second field only listed offices that are in Region 1. This doesn't seem like it should wildly complicated but I cannot figure out how to do it.
I have tried using the expression builder to create nested IIf functions, filtering queries, macros and a few other things but don't have the depth of knowledge to make any of them accomplish what I'm looking to do.
Is there a way to accomplish this easily without VBA? Or if VBA is the only way, can someone point me to a good code that I hopefully figure out and edit for this purpose?
Thank you for any help and advice. Please let me know if I left out any useful information
Steve
enter image description here

MS Word - using a date variable without macros

I want to create a Word template which will:
a) prompt user for a date
b) display that date
c) calculate other dates from that date.
I'm using MS Word 2016.
I've never done anything like this in Word but after doing a bit of research I see that there are advanced options in Word which maybe I could use for that. I don't want to use macros for this as I'm thinking that if I can make this work, then I would share this template with the rest of the company and I don't want them to enable macros (we have enough security concerns without that).
I've tried to use a FILLIN field to prompt user for a date. This works, however, I would like this field to be a variable which I can reference later in the document. I haven't found a way to do that with my FILLIN field. Is it possible?
I've seen others mention DocProperties but I'm having a hard time making it work.
For example, if I go to Quick Parts -> Document Property, none of the options are for a custom date. Is there a way to add your own?
And if I go to Quick Parts -> Fields, I see Date, CreateDate, SaveDate which insert "today's date" - not what I want. Again, how do I add my own Field?
I could do this in many ways by using Excel but I wanted to see if I can make it happen with Word. I hope you guys will have an idea.

Access: Forms, Subforms and Queries

According to the searching I've done over the past couple of days, what I'm trying to achieve should be fairly straightforward but nothing that I've found has solved my problems. This is my first time at using Access, or SQL at all. Apologies in advance for the length of the question.
Essentially I need to pick up a value from one table and multiply it by another in the another table, and then store the result in the second table, via forms and subforms.
The Problem:
I'm attempting to create a database of projects, part of which is a quotation tool. The database has several tables covering all the required inputs for our project managers, most of which are linked to the PKs of their parent tables.
My current attempt has a form (frmJobDetails) giving the details of the each project (linked to tblJobs). This form has two subforms:
frmJobRolesSubform details who's working on the project in what role ( and, notably, their sale rate.
frmJobProcessesSubform details the tasks, who's allocated to which task and the estimated number of hours to complete.
Both subforms link to their own tables (tblJobs_Roles and tblJobs_Processes respectively).
frmJobProcessesSubform obtains the people working on the project and their roles from frmJobRolesSubform so the manager can allocate a person to a task on frmJobProcessesSubform. This is done via a combobox: cboRole.
So far, so good.
I'm needing to obtain the sale rate of the person working on the given task so that I can calculate the cost of the task. Specifically, I'd like a field on the subform to calculate the cost of the task and then store it in tblJobs_Processes.
My Attempts
I've attempted to build a query (qryProcessCost) that calls cboRole, either as an expression in the Field cell or in the Criteria cell ([Forms]![frmJobsProcessesSubform]![cboRole]).
I'm aware this can't successfully when the form isn't active, but I'm getting Access' request for input for [Forms]![frmJobsProcessesSubform]![cboRole] when selecting from the subform. The query runs successfully when example values are hardcoded into the query. The query should, obviously, only return a single value.
I've tried setting the ControlSource of a textbox to [qryProcessCost]![dblProcessCost] (where dblProcessCost is the calculated field), but this can't then write to the table (as far as I can deduce). Also, I get a #Name? error in the cell and I can't seem to get to the bottom of that.
I've tried setting the RecordSource property of a combobox to SELECT [qryProcessCost]![dblProcessCost] FROM [qryProcessCost], and the ControlSource to the relevant field of the table. While this would be a clunky solution, it actually doesn't work anyway as it fails to pick up the value of [Forms]![frmJobsProcessesSubform]![cboRole].
I've tried using an intermediate textbox to determine what value cboRole is passing, and I'm happy with that - the primary key of the role assigned in frmJobsRolesSubform.
The Question:
I'm guessing that I'm probably going to have to resort to VBA at this point to get what I want but I'm unfamiliar with the Access VBA structures (though I've used Excel VBA a fair bit).
Anyone got any ideas, hints, suggestions or pointers?
Cheers in advance,
Aaron
In case anyone else has a similar problem, I've posted my complete solution below:
I implemented Gene's correction to my references, which provided something, but the query wouldn't update when the fields on the form were changed. As I noted in the question, I also really wanted it to be a text box rather than a combo box for usability reasons but wasn't sure how to have a Record Source and Control Source for a text box.
I ended up going round in circles, via VBA and macros and several types of error and happened upon a suggestion to use a DLookUp here. I hadn't been able to get them to work for this particular problem before, but I managed to make it work this time. Specifically, I put the DLookUp in the following macro:
SetProperty
Control Name txtBudgetCost
Property Value
Value =DLookUp("[dblCostRate]","[tblJobs_Roles]","[pkJobs_RoleID]="[cboRole])*[txtBudg‌​etHours]
This macro was used for the After Update event of the relevant fields on the subform.
Setting the value property of a field to a DLookUp meant that I could set the Control Source property of a the text box txtBudgetCost to the relevant field in the table, to obtain the desired behaviour.
Both cboRole and txtBudgetHours are fields on the same subform as the field txtBudgetCost.
The only problem with this solution is that, when the subform is viewed in the Datasheet view, a #Name? error is given for the new record row. I probably just need to enter some error handling somewhere, though I haven't given much thought for what it should be just yet.
Cheers,
Aaron

How do I reference adjacent cells in an Apex tabular form?

Friends,
I'm converting an Oracle Form to Apex and have run into problem(s?) which I hope you can help with. Put simply the problem is how do I reference adjacent cells in an Apex tabular form? Is it possible?
The reason for asking is that I need to create a tabular form with 3 dependent select lists, lets call them:
Divisions
Cost Centres
Accounting codes
What should happen is, if the user chooses "Cost Centres" I need to check both Divisions and Accounting codes to restrict what is shown in the "Cost Centres" select list.
None of the fields are mandatory and the user can enter them in any order, e.g. On a new record the three selects lists have no values, the user selects "Accounting Codes" for which they see all the accounting codes after which if they select "Cost Centres" then they see a list of "Cost Centres" restricted by the "Accounting Code"
My first attempt was to put this in a single entry form where implementing this was a lot easier however this is not a viable solution.
The only example that comes close to what I need to implement is this from Denes Kubicek which blends a lot of technologies to achieve the result. Is this the only solution to this problem?
In case of need I am using Apex 4.0
Thanks for any help you maybe able to provide!
I haven't gone through Denes's example in detail, but yes I'm afraid that even with Apex 4.0 implementing cascading LOVs in a tabular form is going to be a complex task involving Javascript and AJAX. Apex 4.0 doesn't support dynamic actions on tabular forms, and it doesn't have the declarative "parent LOV items" attribute for tabular forms as it does for regular forms. In short, I don't think anything that has been added in Apex 4.0 simplifies this task - except that you can now use jQuery code to manipulate the DOM.