Insert Comment If Checkbox Is Ticked

Jul 10, 2015

I am working on a database which will basically serve to be a massive Auditing Checklist. Lots of "Is this done" type yes/no questions to record, some with a comment.

Brief Description: I have many child-forms on a tab-control, each with a different heading/category of things to check for. When someone visits a store, I would like them to record their findings in this form.

In the above example, if the Floors are clean, no input is necessary. If the floors are not clean then the user ticks the checkbox and the text "Floors were not clean" should be automatically entered into the field: Cleanliness 1. The reason for this is that I wish to link the value from this field to a Microsoft Word document using mail merge for reporting purposes, and in the report it needs to state any problems in full sentences.

I have tried using this code in order to update the comment field when the checkbox is ticked, however, the problem with this is that I would have to insert code manually for every single checkbox in my forms, and I have about 150 checkboxes in total.

Code:
Private Sub Cleanliness_A1_AfterUpdate() If Cleanliness_A1.Value = -1 Then 'If checkbox is checked
Cleanliness_C1.Value = Cleanliness_C1.DefaultValue
Cleanliness_C1.Enabled = True
Else
Cleanliness_C1.Value = ""
Cleanliness_C1.Enabled = False
End If
End Sub

View Replies


ADVERTISEMENT

Execute Insert Statement When Checkbox Is Ticked?

May 16, 2014

I'm trying to get an Insert statement to execute whenever the user ticks the tickbox however my code is failing to find the output table 'Manager':

Code:
Private Sub Check34_AfterUpdate()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim varItem As Variant
Dim strCriteria As String

[Code] .....

View 6 Replies View Related

Hide Form When Checkbox Ticked

Dec 20, 2005

Hi All.
What I would like to do, is have a form popup when the main form is opened in my db, which will detail all the changes I have made to it since the last version (this bit is OK) and also, I would like a checkbox on the popup form, that the user can tick once they have read the details so it will not show up everytime they open the main form. (Just like the "hidestartupform" property within the Northwind Database)

I create the form and all that, but do not know how to do the checkbox so once it is checked, the form will not appear.

Hope this makes sense and someone can enlighten me and point me in the right direction?

Many Thanks.

Frank.

View 4 Replies View Related

Forms :: Opening A Form / Text Box When Checkbox Is Ticked?

Aug 19, 2015

I'm a novice user of Access 2013.

I would like to be able to use a checkbox control to make either text boxes or forms appear when ticked, ultimately to stop a form being so untidy/to conserve space. I'd be using this on multiple occasions.

(If actioned, would it automatically shift the other controls in the form down to make space, or would it just overlap?

View 4 Replies View Related

Access VBA In A From (when Checkbox Is Ticked Then Put Text In Field In Table)

Jan 17, 2014

I have 2 tables both linked to SQL Server 1 has policy information and the other has error information both tables are linked with the relationship policy Ref. The error table(table2) has fields Pol ref, Error_Type,error, Comments, response_comments and response_Date.

There are 25 types of error so what I have done is copy all fields from table 2 25 times exlcuding the policy ref and Error_Type but to make them relate to the relevent error I need to setup some VBA code that does an if Error1_checkbox is ticked then make Error_Type ="error1" and Error=1 else if error1_checkbox is unticked then make error_type null(blank).

I am using ACCESS 2010....

View 7 Replies View Related

If CheckBox True INSERT Into Temp Table

Mar 8, 2013

I have a form where the user selects check boxes to choose what fields to include in a report. Because of the massive amount of data, I need to send it to a temp table and then on to Excel and not use a query.

I have this line of code, for the insert into temptables for other forms that don't require the yes/no box and it works very well, but I can't figure out how to do it with these yes/no conditions.

This is the execute line that inserts into the TempTable for the other forms:

db.Execute "INSERT INTO TempPicktbl (Field1, Field2, Field3, Field4, Field5)" & strQuery, dbFailOnError

How would I write:
If Check1=True Then INSERT INTO TempPicktbl Field1
If Check 2=True Then INSERT INTO TempPicktbl Field2
If Check 3=True Then INSERT INTO TempPicktbl Field 3
etc.

I'm pretty sure it's the INSERT level where I need to put this code.

View 3 Replies View Related

Comment Code?

Jan 17, 2006

Okay Stupid question, But I have tryed different things and have not got anything to work yet, So I am using Microsoft Acess 2003. I would like to be able to comment out block of code. Thanks
Sorry for the stundness...:confused: :confused:

View 3 Replies View Related

Comment A Whole Paragraph With One Click

Sep 27, 2006

Hi,

I wonder if it's possible in Access 2003 to comment a whole paragraph of VBA code with one click instead of commenting each line on its own?

Regards,
B

View 2 Replies View Related

Count Ticked Check Box

Apr 18, 2008

hi
i have table for attendance monitor and contaion following attribute:
session ID
Student Id
Attended session which is in yes/no format or in other work it give u option to tick it

date



and now what i want to do is that create a query and tell it to only count the number of attended session which has been ticked not count all the attended session for one student ,only count the ticked one
any idea please?
thanks

View 8 Replies View Related

Enable Combo When Ticked.

Mar 17, 2006

Hi.
I have sort of found an answer to my problem by this thread (Thread (http://www.access-programmers.co.uk/forums/showthread.php?t=20358&highlight=show+field+ticked))
but it doesn't seem to be working.

I have (amongst others) a tickbox and a combo.

Basically, I would like it so if the tickbox is ticked, the combo is enabled, and no tickbox and it is disabled.

I have been putting this code:-

If Me.Helpdesk_Call = -1 Then
Me.Combo23.Enabled = False
Else
Me.Combo23.Enabled = True
End If

on the forms onCurrent event, and then changing the onUpdate event of the combo, but is doesn't seem to work. I have tried numerous amounts of variations, but nothing seems to be working.

Can someone help?

Thanks.

Frank.

View 3 Replies View Related

Enabling Comments When A Box Is Ticked

Aug 22, 2006

Hey,

In the form I am creating, I have checkboxes. Some of these checkboxes, when ticked, need additional comments entered into a comments box.

Only when the box is ticked, the comments box should appear/become enabled.

Any pointers in the general direction I should help would be greatly appreciated.

Thanks.

View 6 Replies View Related

Comment Out SQL In Access 2000

Nov 13, 2006

Hello,

Really simple one this one. Though I can't find it in the help or in forums. So simple it doesn't rate a mention apparently.

Except that I would dearly love to know how to comment out SQL code whilst writing queries in Access 2000 SQL view. All that retyping and copy/pasting is causing me RSI.

In eager anticipation,

Tim

View 1 Replies View Related

Message Box To Appear With Comment And OK Button

Dec 23, 2013

I have a command button with the VBA code below. I'd like a message box to appear with a comment and an "OK" button that continues the code below . . is this possible?

Private Sub cmdDuplicateOverpayments_Click()
On Error GoTo Err_cmdDuplicateOverpayments_Click
Dim stDocName As String

stDocName = "qryFindduplicatesforOverpaymentsDetails"
DoCmd.OpenQuery stDocName, acNormal, acEdit

[Code] .....

View 10 Replies View Related

Red Triangle Comment Popup

May 27, 2013

Like in excel, when there's a red triangle in the corner of the field which pops up a small comment box, is there a similar functionality in Access that when a field.

Has either a comment associated with it, that a comment box can be made available?

View 6 Replies View Related

Reports :: Comment On Null Field

Jun 20, 2014

I have a field SSEEndDate. I have some records in which this field is empty. What I would like to do is add a comment to explain why the field is empty on a report if possible. Click on it or move the mouse on it or whatever and the comment would show up.

View 14 Replies View Related

If Check Box Is Ticked / Data Must Be Entered

Nov 29, 2012

working through validation rules etc at the minute on my database. Have come across this one is sort of stumping me. I have a tick box in the field "Medication to be repeated" the next field after it is "Date to be repeated on". I am looking a validation rule which makes it that if the checkbox is ticked then date to be repeated must contain a valid date value.

View 8 Replies View Related

Can Remark / Comment Lines Increase Db Size?

Jul 22, 2006

Hi,

Can someone tell me that more remark / comment lines in VBA might be one of the reason of increasing the db size?

Because now a days I am removing the queries from my db and started to use VBA code lines behind each forms and keeping some remark / comment lines to know what a particular set of code line means and what they are doing. So I put everywhere some remarks / comments line. Now my forms are faster than before but the over all size of db become heavy.

Are comment lines one of the reason in increasing db size?

With kind regards,
Ashfaque

View 2 Replies View Related

ASP & MS ACCESS "Two Tables [one Article And One Comment]

Feb 19, 2005

Hi please i have a problem withthis and i need some help,
i received some great help so far thank you So much Markoc.
and now i'm stucj here.


I have two tables :
one called reviews [rid, review]
and the comments [cid, rid, review]

the first two pages work fine, but whenever i click on submit on the second page it take me to the
third one which cannot be displayed.
here is the code on the pages, please if you can help.
------------------------------------------------
on the first page i have " reviews listing "
-------------------------------------------------

<%
Dim oConn, sConnection
Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=xx" & _
"Persist Security Info=False"
oConn.Open(sConnection)
set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "select * from reviews" , oConn
%>

<center><table >

<%
Do while NOT rsUsers.EOF
getrid = rsUsers("rid")
getreview = rsUsers("review")

Response.Write "<tr><a href='viewreview.asp?rid=" & getrid & "'>" & getrid & "</a></td></tr>"
Response.Write "<tr><td colspan='5' width='541' height='25' ><font face='Trebuchet MS'>" & getreview & "</font></td></tr>"

rsUsers.MoveNext
Loop
rsUsers.Close
set rsUsers = Nothing
%>

--------------------------------------------------------------------------------------------------------------------------
the second page is viewreview.asp AND ALSO I HAD A TEXT BOX FOR THE USERS TO LEAVE COMMENTS
--------------------------------------------------------------------------------------------------------------------------

<%
Dim oConn, sConnection
Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=xx" & _
"Persist Security Info=False"
oConn.Open(sConnection)

getrid = Request.QueryString("rid")

strSQL = "SELECT * FROM reviews WHERE rid=" & getrid

Dim rsUsers
set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open strSQL , oConn
getrid = rsUsers("rid")
getreview = rsUsers("review")
rsUsers.Close
set rsUsers = Nothing
%>

<center><table cellpadding="2" cellspacing="2" border="0" width="541" >

<tr><td>"<%= getrid %>"</td></tr>
<tr><td>"<%= getreview %>"</td></tr>


</table><table>


<TR>
<TD vAlign=top bgColor=#d6d6d6 colSpan=6>
<form name="comments" action="submitcom.asp?rid=<%=getrid%>" method="POST">
<textarea name="comment" rows="5" cols="50"></textarea>
<br><br>
<input type="submit" value="Submit">&nbsp;
<input type="reset" value="Reset">
</form>
-------------------------------------------------------------------------------------------
THE LAST PAGE IS submitcom.asp
-------------------------------------------------------------------------------------------

<%
Dim oConn, sConnection
Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\xx"& _
"Persist Security Info=False"
oConn.Open(sConnection)


Dim rsUsers
StrSql = "insert into comments" _
& " (rid, comment)" _
& " VALUES (" _
& "'" & Request("getrid") & "'," _
& "'" & request("comment") & "')"
'DEBUG SCRIPT
'Response.Write StrSql & "<br>"
'response.End
oConn.excute StrSql
set rsUser = nothing
set oConn = nothing
%>


-------------------------------------------------------------------------------------------------

View 1 Replies View Related

Queries :: If Check Box Is Ticked Ignore 1 Criteria

Oct 15, 2014

I have 3 queries populating 3 subreports on a report, i have a checkbox on my main form i launch the report from - i reference it in a filter on the form to ignore certain error types - id like it do to the same in the queries that populate the reports

So the reports atm give - an over all count of error types, a count per person and then a breakdown on type per person

Thats all fine but id like the option to ignore one type of error (as we sometimes look at it and sometimes dont).

View 3 Replies View Related

General :: Looking At Certain Record And Populate Comment Field

Feb 13, 2015

I have Field "BC1Chng" which requires user input. I want to be able to write a code to reference to "BC1Chng" if there is an input in that field for any record...I want to copy the Remarks into each record in the Remarks Field.

I was able to get the remarks1 field to loop through each record copying what was in that field into each record.

Now I want it to look at the BC1CHng field and only copy to remarks1 field if there is any input in that field???

View 9 Replies View Related

Forms :: How To Hide Record If Check Box Ticked

May 17, 2014

I have a subform that populates from a query from a table. I also have a checkbox as part of the table. If the checkbox is ticked, I don't want that record to show in the subform

View 4 Replies View Related

Forms :: Comment Box To Copy To The Rest Of Queried Records

Jan 13, 2015

Here is my code...if I take out the where statement..it copies the remarks all the way down my table to all the records...with the where statement..it's prompting in for parameters..

Private Sub Remarks1_Click()
Dim strMsg As String, strQry As String, strRemark As String
strMsg = "Update All Comments in the Current view. IMPORTANT!!! Will update a the Viewed records."

[Code].....

View 2 Replies View Related

Modules & VBA :: Searching For Text Or Comment Inside PDF Files

Jun 21, 2014

I just want to know if i can create a vba code or a module that will search text or comments in specific table that has attached pdf file.

View 1 Replies View Related

Queries :: Pulling Comment Based On User Selection?

Sep 17, 2013

I have a tblCommets that has 2 columns in it. The first is an identifier (1,2,3) and the second column is a comment associated with that identifier. Is it possible to use a query to pull that comment based on a user selection? So, if the user selects 1 then the comment associated with 1 is pulled, but if the user selects 2 then that comment results.

Code : =Select[tblComments].Column(2)

View 1 Replies View Related

General :: Can Hyperlinks Be Permitted In Long Text Comment Box?

Aug 6, 2013

I have a comment box that was just for text. I have been asked to adapt this to allow a web URL to be typed in which would then become a clickable hyperlink (like typing in a Word document). Is this possible?

View 3 Replies View Related

Forms :: Check Box Within A Form Ticked Or Not Dependent On Another Value Within A Field?

May 10, 2013

I there a way to determine whether or not my checkbox within a form is ticked or not dependent on another value within a field?

I have a field called 'DaysRemaining' and another check box field called 'Expired'. I want the expired checkbox to be ticked if the value within 'DaysRemaining' is '<0' and unticked if '>=0'. Is there a way i can do this within the control source of my check box?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved