Adding Comments To An SQL Query

Apr 12, 2006

How can I add comments in an SQL Query mode? ",',?, ; None of these work with text following them.

View Replies


ADVERTISEMENT

Adding Comments Into SQL Code

Dec 17, 2005

I would like to insert comments into my sql code (select query > sql view window).

I tried with usual sequences such as /* ... */ but it doesn't work.

Does anyone knows the right sequence ?

Thanks.

View 6 Replies View Related

Adding To Comments For Multiple Records

Aug 23, 2005

I have a comments on my form. I have contacts with them having from 1 to many customers accts. I am trying to come up with a way to update the comments for a contact that adds those comments to all their customers records...but not to those that have been closed.
How would I add these comments to the comments on the form without overwriting the current comments.

Comments - Memo
Contact - Text

It's quite a pain, copying and pasting from record to record.

Thanks

View 1 Replies View Related

Add Comments:

Nov 1, 2007

Hi Alli,
I have a database that has a comments field. The database has a status field: Plan Test and Run,
in the comments field the user adds comments, i'm trying to updated the comments with the status, for example; the user added some comments like. "The test will begin next week" I want the comments feild to automatically get updated when the user changes the status for example to Run, I want the "run status to be added to end of the comments line" can somebody help? Thanks.

View 3 Replies View Related

Showing Only Approved Comments

Aug 3, 2006

On our site we have option where users can add coments to articles. Lately some people have been misbehaving. I wish to add a field in .mdb file and call it "approved". If the field contains "1" then it's ok to show the message, if the field has nothing in it comment will not be shown. How do I implement this into below code. I wish to leave posting as is, just not showing not yet approved comments.

Thank you in advance. (comments are shown in <td>" & rs("Comment") & "</td> part)

Here is the code:

' show past comments
If Not rs.EOF Then

s = s & " <tr bgcolor=""" & TitleBGColor & """>" & vbCrLf
s = s & " <td colspan=""3"">&nbsp;Comments:</td>" & vbCrLf
s = s & " </tr>" & vbCrLf

While not rs.EOF
s = s & " <tr class=""" & TitleClass & """>" & vbCrLf
s = s & " <td>&nbsp;</td>" & vbCrLf
s = s & " <td>From:</td>" & vbCrLf
s = s & " <td>" & rs("Name") & " (" & rs("DateAdded") & ")</td>" & vbCrLf
s = s & " </tr>" & vbCrLf
s = s & " <tr>" & vbCrLf
s = s & " <tr class=""" & TitleClass & """>" & vbCrLf
s = s & " <td>&nbsp;</td>" & vbCrLf
s = s & " <td>Comment:</td>" & vbCrLf
s = s & " <td>" & rs("Comment") & "</td>" & vbCrLf
s = s & " </tr>" & vbCrLf
s = s & " <tr>" & vbCrLf
s = s & " <td>&nbsp;</td>" & vbCrLf
s = s & " <td>&nbsp;</td>" & vbCrLf
s = s & " <td>&nbsp;</td>" & vbCrLf
s = s & " </tr>" & vbCrLf
rs.MoveNext
Wend
End If

View 1 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

Comments Section, Modify Denied?

May 20, 2005

We have several users that access the same database. Is there a way to make it so that the users can add comments to the "coments" field on the form, but not remove any comments once saved?

View 1 Replies View Related

Help Re Creating A Space For Comments On A Form PLEASE!!

Feb 6, 2006

Help please!!!!

Firstly, I would apologise as I am not overly familiar with the correct terminology!

I need to create a "space" on my form whereby I can add comments etc which will exceed 255 characters: these comments will be specific to each record. I have tried having an "unbound" text box in design view but this makes the comments the same on each record.

I know this is probably "as clear as mud" but if anyone can help I would be really grateful.

Thanks,

Emma

View 3 Replies View Related

Forms :: Show History Of Comments?

Sep 7, 2014

I am developing a new tool which needs to show the history of updates to the users, i.e.:

An observation is entered into a field on the MAIN FORM by user 1.

User 2 reviews the observation on the MAIN FORM and adds a separate comment in another field on the same form.

When the record is saved, the updates are NOT written to the Main Form Table but to the UPDATES TABLE for audit purposes.

I am also using current date/ time as a timestamp, which is protected and needs to be carried over to the UPDATES TABLE Every time a new comment is added in the MAIN FORM, I need it to be written to the UPDATES TABLE as a new record.

What I need to be able to show is:

Each comment added, as a list of readable records, in a table within the main form AND Each time the main form is refreshed/ opened the separate comment field is blank to enable each new update to be applied.

View 4 Replies View Related

Growing Text Box For Comments To Fit Perfectly

Nov 21, 2014

I'm trying to make a text box for comments that grows as the user types to fit the comment perfectly.

The comments can be anywhere from 2 words to a paragraph long.

Is this even possible? If it is, is the best place to do it on a form?

I've made a text box and tried the "Can Grow" property, but that doesn't increase the size as you type.

I'm wondering maybe if there's a VBA "After Update" Code that will readjust the textbox to fit the code?

View 1 Replies View Related

Change Existing Comments On A Report?

Nov 12, 2012

how to change existing comments on a report?

View 1 Replies View Related

Force Update Into Unbounded Comments Field

Oct 24, 2005

Hopefully there's someone who can help me with this!!! I've had several unsuccesfull attempts and don't know what else to try...

We're trying to force users to make entries in a field called txtComments in the frmQuestionnaire form if they provide negative responses and to stay on that record until the comments are changed. Inside the form is an option group (fraResponses) which contains options (OptA, OptB..etc.) valued from 1 through 7, based on a likert 7 scale. We're only using a likert 6 scale, so the respondents will only see 2-7 on the form. If they options B-D (valued 2-4), they are considered negative, so we want to make sure they enter a comment.

I tried to enter the italicized code under the form on BeforeUpdate, AfterUpdate, CmdUp (click to next question) and CmdDown (click to previous question), with frmQuestionnaire but nothing happens:

There is a module called clsUser which contains the following and where I tried to insert the code:

Set myForm = Forms!frmQuestionnaire
' ================================================== ==
' First, set the value of the variables
' ================================================== ==
lngQuestion = arrQ(lngArray, 0)
lngSession = GetCustomInfo("TestSession")
lngUser = UserID
lngBillet = BilletID

strComment = Nz(myForm.txtComment, "")

strComment = "None"

'If user selects negative responses
If Form_frmQuestionnaire.fraResponses.OptionValue = 2 Or 3 Or 4 And strComment = "None" Then
MsgBox "Please explain the problems you encountered with the system which " & _
"caused you to select an unfavorable response."
Form_frmQuestionnaire.txtComment.SetFocus

End If

lngResponse = myForm.fraResponses


When I place the code there, the dialog box appears for all values and goes to the next record. This is what appears for the CmdUp (click to next question):

If cUser.blnDirty = False And Me.fraResponses = 153 (this is default value for the entire option group) And cUser.blnNew = True Then
cUser.blnDirty = True
End If

cUser.CaptureAnswer
If cUser.lngArray < cUser.UBound_ArrQ() Then
cUser.lngArray = cUser.lngArray + 1
Else
cUser.lngArray = cUser.UBound_ArrQ()
End If
cUser.FillQuestions
cUser.blnDirty = False

I've tried to enter the line of code with the form and the module, but no luck.

I also want it to remain on the same record until the field is changed. The form is unbound and has the following:

Public Sub FillQuestions()


'************************************************* ****
' Purpose: Scroll through the questions
'
' Assumptions: N/A
'
' Effects: N/A
'
' Inputs:
' None
'
' Returns:
' None
'************************************************* ****

Dim lngRG As Long

Set myForm = Forms!frmQuestionnaire
myForm.txtQuestion = arrQ(lngArray, 1)
lngRG = arrQ(lngArray, 2)
myForm.prgProgress.Value = lngArray + 1
myForm.lblProgText.Caption = "Question " & (lngArray + 1) & " of " & lngQuestions
myForm.lblTS.Caption = "Test Session: " & arrQ(lngArray, 3)
myForm.lblQID.Caption = "Question ID: " & arrQ(lngArray, 0)

GetResponseSet lngRG
FillAnswers
If lngArray = 0 Then
myForm.txtComment.SetFocus
myForm.cmdDown.Enabled = False
Else
myForm.cmdDown.Enabled = True
End If

If lngArray >= UBound(arrQ) Then
myForm.txtComment.SetFocus
myForm.cmdUp.Enabled = False
Else
myForm.cmdUp.Enabled = True
End If
End Sub

Public Sub FillAnswers()
'************************************************* ****
' Purpose: Fill out the user's previous responses
'
' Assumptions: N/A
'
' Effects: N/A
'
' Inputs:
' None
'
' Returns:
' None
'************************************************* ****

Dim strSQL As String
Dim recAnswer As New ADODB.Recordset

Set myForm = Forms!frmQuestionnaire
strSQL = "SELECT datResponse.reDatQuestionID, datResponse.reDatRespondentID, "
strSQL = strSQL & "datResponse.reDatResponseSetID, datResponse.reComment "
strSQL = strSQL & "FROM datResponse "
strSQL = strSQL & "WHERE datResponse.reDatQuestionID=" & arrQ(lngArray, 0)
strSQL = strSQL & "AND datResponse.reDatRespondentID=" & UserID

recAnswer.Open strSQL, CurrentProject.Connection, adOpenForwardOnly, adLockOptimistic

If Not recAnswer.EOF Then
myForm.fraResponses = recAnswer!reDatResponseSetID
myForm.txtComment = recAnswer!reComment
blnNew = False
Else
If myForm.fraResponses <> 152 Then
myForm.fraResponses = 153
myForm.txtComment = ""
blnNew = True
End If
End If

recAnswer.Close
Set recAnswer = Nothing

End Sub

Thanks in advance for your help!!

View 1 Replies View Related

General :: Keeping History Of Notes / Comments

Mar 26, 2014

How to extract the comment system from the Contacts Web Database template found in Access 2010? I can upload it if you like.

I would like to use it in a standard desktop database to track notes and comments in my records.

I am able to convert it from web to standard, but it still appears to use data macros or something, and my knowledge on macros is limited.

I just want to keep a history of my notes for each record, with the most recent always listed, and the comment system in the Contacts Web Database template seems perfect for that. I just don't know how to implement it into my desktop database.

View 1 Replies View Related

General :: Append Comments Field With User Name

Aug 20, 2013

I need to save a user's machine name when they comment on a record.

I have a form that has a comments field, and a separate area that shows the historical entries from comments.

I also have an invisible field populated by "=fOSMachineName()" that shows the users machine name. Getting this running was tough on my 64 bit machine, but it now works!)

I wish to have the machine name included in the comments field every time the "Save Record and Close" button (which runs a macro) is clicked.

Right now, when someone adds comments, it shows a date and time stamp (which I still want to keep) but I want to also capture the machine name at the same time.

View 11 Replies View Related

General :: Not Enough Space For Comments (Limited To 255 Characters)

Sep 18, 2013

We have created a database where data entry happens on the first form. So far all is working well on this form except users complain there is not enough space for comments. I set up a column for comments, but it is limited to 255 characters. What/How else can I set this up to provide a lot more room?

View 1 Replies View Related

Modules & VBA :: How To Record Username In History Comments

Nov 26, 2013

I have a field that records comments call house comments i wonder is it possible to record which user leaves what comment?

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

View 1 Replies View Related

Keep Track Of Multiple Notes / Comments In A Record?

Mar 25, 2014

I'm using Access 2013, with a standard database (non web).

I am trying to figured out a method to keep track of notes and comments that are entered into a record. I would like them to be time stamped, and the most recent listed first.

Do I have to use a split form or similar to do that? Is there a intermediate to easy method of accomplishing this task?

If anyone has seen the Contacts Web database template in Access 2010, the 'Add a Comment' section would be ideal to what I'm looking for. Unfortunately, I'm not sure how to implement it into my database.

View 3 Replies View Related

Forms :: Comments In Descending Order In Memo Field

May 5, 2015

Having some trouble with a memo field. For each record, the notes field is present on the Form.... I added an unbound text box (txtMemoAdd) and a command button (Add New Note). When the button is selected, it adds the note to the Read Only Notes Field and adds a timestamp using the following code:

Me.Notes = Me.Notes & vbCrLf & Now () & VbCrLf & Me.txtMemoAdd
Me.txtMemoAdd = ""

The note is added to the bottom, and I was wondering if there was a way to make the new note go to the TOP of the field (Descending Order rather than Ascending).

View 5 Replies View Related

Queries :: How To Insert Comments And Notes Using Singular Quote

Feb 5, 2015

I know that you can insert comments and notes in VBA code using a singular quote, like the following:

Code:
'Comment about what the code does

Is there a similar way to insert comments in the SQL of queries? I found other forum posts that say this isn't possible but those were all for pre-2010 Access. Has this changed at all?

View 5 Replies View Related

Forms :: Copying Memo Field Comments To Other Queried Record

Jan 15, 2015

I have one memo per change (user input)...I need to have the comment the user inputs to copy into other records that were queried. I tried insert. My coding does one of the records or all of the records ..I need it to copy just to the queried records ...and I have a query but no filter set.

View 4 Replies View Related

Tables :: Access 2007 / Importing Tables With Comments?

Oct 7, 2014

finding some way to import my tables from excel into access 2007 with comments still inside their boxes.

one of the columns in my table is called "Order No" and each field contains a Comment as a note to go with the order.

Is there a way to keep this setting when importing the tables into access 2007?

View 11 Replies View Related

Adding Tax To Query

Mar 16, 2006

I have developed a query which adds accumulated costs for each client in my DB, I am having trouble adding the VAT tax which is 17.5% to the query though, I seem to get a lesser total once tax is added which can't be correct.

Here is my query:
SELECT DISTINCT Holiday_Bookings.ClientID, Holiday_Bookings.Booking_Cost, Room_Facilities.FacilityCost, Rooms.[CostPerNight], Rooms![CostPerNight]*Nights_Stayed+Holiday_Bookings!Booking_Cost+Room_ Facilities!FacilityCost AS TotalCost
FROM Room_Facilities INNER JOIN (Hotels INNER JOIN (Holiday_Bookings RIGHT JOIN Rooms ON Holiday_Bookings.ClientID=Rooms.ClientID) ON Hotels.HotelID=Rooms.HotelID) ON Room_Facilities.FacilityID=Rooms.FacilityID;

View 3 Replies View Related

Help Adding Something To This Query

Mar 23, 2006

I have a table called DSERDBA_CASE_STATUS_CHANGE and it contains the following fields:

DSERDBA_CASE_STATUS_CHANGE.STAT_CASE_ID,
DSERDBA_CASE_STATUS_CHANGE.STAT_BEGIN_DATE,
DSERDBA_CASE_STATUS_CHANGE.STAT_END_DATE,
DSERDBA_CASE_STATUS_CHANGE.STAT_FROM_CASE_STATUS,
DSERDBA_CASE_STATUS_CHANGE.STAT_TO_CASE_STATUS,
DSERDBA_CASE_STATUS_CHANGE.STAT_USERID,
DSERDBA_CASE_STATUS_CHANGE.STAT_ACTIVITY_CODE,
DSERDBA_CASE_STATUS_CHANGE.STAT_COMMAND,
DSERDBA_CASE_STATUS_CHANGE.STAT_REASON_CODE

I’m looking to find CASE_ID's where the BEGIN_DATE is greater than 09/30/2005 and less than 10/01/2006 where the CASE_STATUS went from O to C and where the STAT_REASON_CODE does not equal INT27 and I have come up with this query which works fine.

SELECT
DISTINCT
DSERDBA_CASE_STATUS_CHANGE.STAT_CASE_ID,
DSERDBA_CASE_STATUS_CHANGE.STAT_BEGIN_DATE,
DSERDBA_CASE_STATUS_CHANGE.STAT_END_DATE,
DSERDBA_CASE_STATUS_CHANGE.STAT_FROM_CASE_STATUS,
DSERDBA_CASE_STATUS_CHANGE.STAT_TO_CASE_STATUS,
DSERDBA_CASE_STATUS_CHANGE.STAT_ACTIVITY_CODE,
DSERDBA_CASE_STATUS_CHANGE.STAT_COMMAND,
DSERDBA_CASE_STATUS_CHANGE.STAT_REASON_CODE

FROM DSERDBA_CASE_STATUS_CHANGE

WHERE
(((DSERDBA_CASE_STATUS_CHANGE.STAT_BEGIN_DATE)>#9/30/2005# And
(DSERDBA_CASE_STATUS_CHANGE.STAT_BEGIN_DATE)<#10/1/2006#) AND
((DSERDBA_CASE_STATUS_CHANGE.STAT_FROM_CASE_STATUS )="O") AND
((DSERDBA_CASE_STATUS_CHANGE.STAT_TO_CASE_STATUS)="C") AND
((DSERDBA_CASE_STATUS_CHANGE.STAT_REASON_CODE)<>"INT27"));

My problem is that I also want to exclude cases where the case went from CASE_STATUS C to O on the same date that it went from O to C (it closed and reopened on the same day) And I don’t know how to adjust this query to accomplishment this.

Can someone show me how? Thanks

View 1 Replies View Related

Adding A Row To The Query

Aug 3, 2006

hallo everyone,

i have the following query and i am getting the following output

SELECT Sum(tbl_RFQ_Details_AVOB.[AVOB RFQ]) AS [SumOfAVOB RFQ], tbl_Status.Status
FROM tbl_Status LEFT JOIN tbl_RFQ_Details_AVOB ON tbl_Status.ID = tbl_RFQ_Details_AVOB.Status
GROUP BY tbl_Status.Status, tbl_RFQ_Details_AVOB.Status;


SumOfAVOB RFQStatus
16900110RFQ in Process
12610000Under Review
1200000 Decided
3500000 Terminated
1000000 Terminated Supplier
6000000 Leverage Back
40000000Uncompetitive
500000 RFQ in Preparation


Now i require a new line in addition to this that says that the total value is and the sum of those values must be given.

required output:

SumOfAVOB RFQStatus
16900110RFQ in Process
12610000Under Review
1200000 Decided
3500000 Terminated
1000000 Terminated Supplier
6000000 Leverage Back
40000000Uncompetitive
500000 RFQ in Preparation
totalvalue Total RFQ

How can this be done?

regards,
aravind.s

View 1 Replies View Related

Adding Query Fields Together

Nov 10, 2005

My company has a microsoft access table with about 1200 IDs containing names, addresses etc.
Now I want to print this out in an excel sheet because I want to create address stickers, but I want every cell in the excell sheet to add information about the columns in the database together. I might be very unclear, let me demonstrate what I mean:
The Acess file might look like this:
id | name | address
1 | john | Street 01
2 | sara | Street 02

Now I want to have 2 excell cells which contain the information like this:
name_address
name_address

In my example, 2 cells with the following information:

john Street 01
sara Street 02

So I dont want 4 cells, I want to add the information together from 1 Id to 1 cell, but I also want to add linebreaks to it, It must eventually become an address sticker

How can this be done?

View 3 Replies View Related

Need Help Adding Query To Table?

Nov 23, 2005

Hi All,

I am trying to add the infomation from a query and place it in a table so that I can use that data to build a Union Query that plots onto a chart.

Heres what I have:
Dim qDef As DAO.QueryDef
Dim SQL As String

Set qDef = CurrentDb.QueryDefs("QryBaseline")

SELECT tblAudio.AudioID, tblAudio.PatientID, tblAudio.AudioDate, tblAudio.Type, tblAudio.L500, tblAudio.L1k, tblAudio.L2K, tblAudio.L3K, tblAudio.L4K, tblAudio.L6K, tblAudio.L8K, tblAudio.R500, tblAudio.R1k, tblAudio.R2K, tblAudio.R3K, tblAudio.R4K, tblAudio.R6K, tblAudio.R8K
FROM tblAudio
GROUP BY tblAudio.AudioID, tblAudio.PatientID, tblAudio.AudioDate, tblAudio.Type, tblAudio.L500, tblAudio.L1k, tblAudio.L2K, tblAudio.L3K, tblAudio.L4K, tblAudio.L6K, tblAudio.L8K, tblAudio.R500, tblAudio.R1k, tblAudio.R2K, tblAudio.R3K, tblAudio.R4K, tblAudio.R6K, tblAudio.R8K
HAVING (((tblAudio.Type)="BL")) AND (((tblAudio.PatientID)=[Me]![PaiteintID]));

I have a "tblEvaluate" that I want to store the above selected record.

I am not sure whether to add and Delete, OR Edit and Update?

How do I get the above information into the table - "tblEvaluate"?

I know it's simple, I just have a mental block!
Thanks for you help....ENVIVA

View 3 Replies View Related







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