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 Replies


ADVERTISEMENT

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

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

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 14 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

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 :: 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

General :: Comment History Field To Appear On A Form - Change Sort Order Of Results

Aug 28, 2013

I have after much stress gotten my comments history field to appear on a form.

The following code gives me what I needed

Code:
=ColumnHistory([RecordSource],"LastUpdateBy","[ID]=" & Nz([ID],0))

I have only one simple thing left, that is perplexing to say the least.

Some comment fields will be many short notes, spread over time.

My desire is to change the sort order of the results so the most recent (rather than the initial) comment is at the top.

View 5 Replies View Related

Please Review This Code, (simple Code) New With Codes

Feb 16, 2006

Works great, but when I hit the number "3", (3 times in row) it will let me into the form. I want it to not let me in IF I don't know the password.

Where did I go wrong?

Private Sub Form_Load()
Dim pw As Variant

If InputBox("What is the password?", "Password") = "1" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
If InputBox("What is the password?", "Password") = "2" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
End If
End If


End Sub

View 14 Replies View Related

Using Code To Unprotect And Protect Viewing Code

Jan 14, 2007

I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"

Is there a way to write code that will remove that Lock Project check and check it back on?

I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.

Thanks

SHADOW

View 6 Replies View Related

If Field 1 Is Yes, Then Field 2 Must Have Comment

May 4, 2006

I just can't figure this out..I have two fields in my database that I want to be able to have a regulation that if the user Enter Yes to field1 than they MUST enter some comment on field2. They can't skip it. However, Field1=No, they can skip field2..Is this possible? is this have something to do data validation? Please help..thanks in advance..

View 2 Replies View Related

Code Help Please!

Apr 27, 2005

I have a button that runs a macro to insert NOW() into a text box.
This is how it is coded;

Private Sub Start_transferred_job_button_Click()
On Error GoTo Err_Start_transferred_job_button_Click

Dim stDocName As String

stDocName = "Start transfered job"
DoCmd.RunMacro stDocName

Exit_Start_transferred_job_button_Click:
Exit Sub

Err_Start_transferred_job_button_Click:
MsgBox Err.Description
Resume Exit_Start_transferred_job_button_Click

End Sub


How do I write the code to populate the [start Time] text box with NOW() when the button is clicked without using a macro???

View 1 Replies View Related

Need Help With Code

Nov 22, 2005

Need a little help here. I have this code on a command button that open a form that displays a chart. The chart work great as long as there is data to display. However, if there is no data then the chart is blank. So what I'm trying to do is add a dcount to catch the 0 and give an error. So the 1st query makes the table where the data for the chart come from. The Qry-Test for Zero query, queries that new table if dcount is 0 it should error.
My problem is that I can't get this to work with the 0 if I make it 1 then I will get the message box if there are no records and if there is 1 record 2 and greater work fine. So my question is why won't the code catch the 0?


Dim stDocName As String
stDocName = "Qry-Makes Table"
DoCmd.OpenQuery stDocName, acNormal ', acEdit

If DCount(" * ", "Qry-Test for Zero") = 0 Then
MsgBox " There is no data for this time frame to chart. Please re-enter your Date range"
Exit Sub
Else



Thanks

jon

View 1 Replies View Related

Need Help With Code

Nov 22, 2005

Need a little help here. I have this code on a command button that open a form that displays a chart. The chart work great as long as there is data to display. However, if there is no data then the chart is blank. So what I'm trying to do is add a dcount to catch the 0 and give an error. So the 1st query makes the table where the data for the chart come from. The Qry-Test for Zero query, queries that new table if dcount is 0 it should error.
My problem is that I can't get this to work with the 0 if I make it 1 then I will get the message box if there are no records and if there is 1 record 2 and greater work fine. So my question is why won't the code catch the 0?


Dim stDocName As String
stDocName = "Qry-Makes Table"
DoCmd.OpenQuery stDocName, acNormal ', acEdit

If DCount(" * ", "Qry-Test for Zero") = 0 Then
MsgBox " There is no data for this time frame to chart. Please re-enter your Date range"
Exit Sub
Else



Thanks

jon

View 1 Replies View Related

Code Help?

May 19, 2006

I use the code below on a search form. I would like for the results of the list box search to populate a report instead of the list box. Is it possible to take the the sql and move it to a report? Thanks..

Dim strsql As String, strOrder As String, strWhere As String
Dim dbNm As Database
Dim qryDef As QueryDef
Set dbNm = CurrentDb()

strsql = "SELECT SiteIssues_tbl.IssueID, SiteIssues_tbl.SITE_ID, SiteIssues_tbl.IssueID, SiteIssues_tbl.AdminDate, SiteIssues_tbl.Occurring, SiteIssues_tbl.Issue, SiteIssues_tbl.Administrative, SiteIssues_tbl.Technical, SiteIssues_tbl.IssueComments, SiteIssues_tbl.CandidatesAffected, SiteIssues_tbl.RecordCreated, SiteIssues_tbl.User, SiteIssues_tbl.DateModified " & _
"FROM SiteIssues_tbl"


strWhere = "WHERE"

strOrder = "ORDER BY SiteIssues_tbl.AdminDate;"


'Set the WHERE clause for the QueryDef if information has been entered into a field on the form
If Not IsNull(Me.txtIssue) Then '<--If the textbox txtCenterName contains no data THEN do nothing
strWhere = strWhere & " (SiteIssues_tbl.Issue) Like '*" & Me.txtIssue & "*' AND" '<--otherwise, apply the LIKE statment to the QueryDef
End If

If Not IsNull(Me.txtAdminDate) Then
strWhere = strWhere & " (SiteIssues_tbl.AdminDate) Like '*" & Me.txtAdminDate & "*' AND"
End If

If Not IsNull(Me.txtSite) Then
strWhere = strWhere & " (SiteIssues_tbl.SITE_ID) Like '*" & Me.txtSite & "*' AND"
End If

'Pass the SQL to the RowSource of the listbox

Me.lstSearchResult.RowSource = strsql & " " & strWhere & "" & strOrder

With Me.lstSearchResult
If .ListCount > 0 Then
GetListCount = .ListCount - 1 'Headings count
Else
GetListCount = 0 'Headings don't count if no items listed!!
End If
Me.Text31 = .ListCount - 1

Dim ctl As Control
End With
If Me.Text31 = -1 Then
Me.Text31.Value = 0
Me.lstSearchResult.RowSource = ""
DoCmd.RepaintObject acForm, "SitesIssues_qry"
Me.Requery


MsgBox "No Records Found."

For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acCheckBox Then
ctl.Value = Null
DoCmd.RepaintObject acForm, "SitesIssues_qry"
Me.lstSearchResult.RowSource = ""
Me.Requery
End If
Next ctl
End If

View 1 Replies View Related

VBA Code

Jun 1, 2006

I have written the code below, which should work, however I am receiving an Error: Run Time Error '13' Type mistmatch on line:

Set cn = Application.CurrentProject.Connection.

Can anyone help?

Option Compare Database
Option Explicit

Private Sub cmdRun_Click()

Dim NICode As String
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection

Dim strSQL As String

Set cn = Application.CurrentProject.Connection
Set rs = New ADODB.Recordset
NICode = "txtLetter"

strSQL = "SELECT " & NICode & "1a, " & NICode & "1b, " & NICode & "1c, " & NICode & "1d & NICode & "1g & NICode & "1h FROM [WorkPlace NI Breakdown]"

rs.Open strSQL, cn

If Not (rs.EOF And rs.BOF) Then
MsgBox rs.Fields(NICode & "1a")
MsgBox rs.Fields(NICode & "1b")
MsgBox rs.Fields(NICode & "1c")
MsgBox rs.Fields(NICode & "1d")
MsgBox rs.Fields(NICode & "1g")
MsgBox rs.Fields(NICode & "1h")


End If
rs.Close
cn.Close

Set rs = Nothing
Set cn = Nothing

End Sub

View 3 Replies View Related

A Code

Jan 3, 2007

Hi all,

I have code bellow which is bringing a tab called Heffalump from the excel spreadsheet into table. Now, what I need is to create a text box where I will be typing PI1228131313 and it's going to be changed in the code bellow.

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Test Import Specification", "K:FIDCPGCCGPI1228", True, "Heffalump!"

THANKS,
B

View 1 Replies View Related

A Code

Jan 3, 2007

Hi All,

I have a code bellow which takes data from Excel spreadsheet and puts it into table in access. I want to see this code in txtbox and be able to change the path's.. Please advice. I tried typing.. Me.mytextbox.value = but for some reason doesn't work..
Should I use Ufter Update or something like that..?


DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Test Import Specification", "K:FIDCPGPI1206", True, "Heffalump!"

View 1 Replies View Related

Any Help With My Code;

May 3, 2007

Hi,

I 've converted the code to ADO method. It was working fine in DAO but know I get the following error and i can't figure it out the soloution.

Run-time error ‘3265’

Item cannot be found in the collection corresponding to the requested name or ordinal

Function ChangeQuantUnit(Material, quant_a, unit_a, unit_b)

Static M As New ADODB.Recordset
Static Mat_SQL As String

ChangeQuantUnit = 0

Mat_SQL = "SELECT SAP_Materials.Material, SAP_Materials.K, SAP_Materials.Base_K, SAP_Materials.KG, SAP_Materials.Base_KG, SAP_Materials.MTR, SAP_Materials.Base_MTR, SAP_Materials.ST, SAP_Materials.Base_ST FROM SAP_Materials WHERE (((SAP_Materials.Material)=""" + Material + """));"
M.Open (Mat_SQL), CurrentProject.Connection, adOpenKeyset, adLockOptimistic

If unit_a = "LB" Then
ChangeQuantUnit = (quant_a / 2.2)
Else
If M(unit_a) * M("BASE_" + unit_b) > 0 Then 'this is the line that crashes
ChangeQuantUnit = quant_a * M(unit_b) * M("BASE_" + unit_a) / (M(unit_a) * M("BASE_" + unit_b))
End If
End If

M.Close

End Function

View 1 Replies View Related







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