Some Quotation Mark

This code support only (Numeric value) can any one covert this code to 
accept (text value)

==================================

The code

If DCount("[GoupNumber]", "TblAccomodation", "[GoupNumber] = " & 
Me.GroupNumber) > 0 Then

DoCmd.OpenForm "frmaccomodation", , , "([GoupNumber]=" & Me.GroupNumber & 
")"

===================================

I think I need some quotation mark but I don't know where can I put them

Thank you


0
a
2/5/2008 5:34:35 PM
access.formscoding 7494 articles. 0 followers. Follow

3 Replies
384 Views

Similar Articles

[PageSpeed] 48

"a" <a@a.net> wrote in message 
news:%23KYkk1BaIHA.1208@TK2MSFTNGP05.phx.gbl...
> This code support only (Numeric value) can any one covert this code to 
> accept (text value)
>
> ==================================
>
> The code
>
> If DCount("[GoupNumber]", "TblAccomodation", "[GoupNumber] = " & 
> Me.GroupNumber) > 0 Then
>
> DoCmd.OpenForm "frmaccomodation", , , "([GoupNumber]=" & Me.GroupNumber & 
> ")"
>
> ===================================
>
> I think I need some quotation mark but I don't know where can I put them
>
> Thank you

Dim strCriteria As String

strCriteria = "[GoupNumber] ='" & Me.GroupNumber & "'"

If DCount("[GoupNumber]", "TblAccomodation", strCriteria) Then
    DoCmd.OpenForm "frmaccomodation", , , strCriteria
End If


0
Stuart
2/5/2008 5:57:35 PM
Thank you for your time

Thank you very  much the code work very good

But can you demonstrate the code for me

Give me some comment to understand

How the code work?



Dim strCriteria As String

strCriteria = "[GoupNumber] ='" & Me.GroupNumber & "'"

If DCount("[GoupNumber]", "TblAccomodation", strCriteria) Then
    DoCmd.OpenForm "frmaccomodation", , , strCriteria
End If



"Stuart McCall" <smccall@myunrealbox.com> wrote in message 
news:foa82n$fsk$1$830fa79f@news.demon.co.uk...
> "a" <a@a.net> wrote in message 
> news:%23KYkk1BaIHA.1208@TK2MSFTNGP05.phx.gbl...
>> This code support only (Numeric value) can any one covert this code to 
>> accept (text value)
>>
>> ==================================
>>
>> The code
>>
>> If DCount("[GoupNumber]", "TblAccomodation", "[GoupNumber] = " & 
>> Me.GroupNumber) > 0 Then
>>
>> DoCmd.OpenForm "frmaccomodation", , , "([GoupNumber]=" & Me.GroupNumber & 
>> ")"
>>
>> ===================================
>>
>> I think I need some quotation mark but I don't know where can I put them
>>
>> Thank you
>
> Dim strCriteria As String
>
> strCriteria = "[GoupNumber] ='" & Me.GroupNumber & "'"
>
> If DCount("[GoupNumber]", "TblAccomodation", strCriteria) Then
>    DoCmd.OpenForm "frmaccomodation", , , strCriteria
> End If
>
> 


0
a
2/5/2008 7:47:30 PM
"a" <a@a.net> wrote in message 
news:eE%23Q1$CaIHA.3880@TK2MSFTNGP05.phx.gbl...
> Thank you for your time
>
> Thank you very  much the code work very good
>
> But can you demonstrate the code for me
>
> Give me some comment to understand
>
> How the code work?
>
>
>
> Dim strCriteria As String
>
> strCriteria = "[GoupNumber] ='" & Me.GroupNumber & "'"
>
> If DCount("[GoupNumber]", "TblAccomodation", strCriteria) Then
>    DoCmd.OpenForm "frmaccomodation", , , strCriteria
> End If
>
>
>
> "Stuart McCall" <smccall@myunrealbox.com> wrote in message 
> news:foa82n$fsk$1$830fa79f@news.demon.co.uk...
>> "a" <a@a.net> wrote in message 
>> news:%23KYkk1BaIHA.1208@TK2MSFTNGP05.phx.gbl...
>>> This code support only (Numeric value) can any one covert this code to 
>>> accept (text value)
>>>
>>> ==================================
>>>
>>> The code
>>>
>>> If DCount("[GoupNumber]", "TblAccomodation", "[GoupNumber] = " & 
>>> Me.GroupNumber) > 0 Then
>>>
>>> DoCmd.OpenForm "frmaccomodation", , , "([GoupNumber]=" & Me.GroupNumber 
>>> & ")"
>>>
>>> ===================================
>>>
>>> I think I need some quotation mark but I don't know where can I put them
>>>
>>> Thank you
>>
>> Dim strCriteria As String
>>
>> strCriteria = "[GroupNumber] ='" & Me.GroupNumber & "'"
>>
>> If DCount("[GoupNumber]", "TblAccomodation", strCriteria) Then
>>    DoCmd.OpenForm "frmaccomodation", , , strCriteria
>> End If

Ok, apologies for being terse in my response. The reason I used a string 
variable (strCriteria) was to avoid squeezing everything into the Dcount 
line. Makes it more readable and maintainable. This code:

strCriteria = "[GroupNumber] ='"

inserts an apostrophe just before we insert the value:

& Me.GroupNumber

Then this part:

& "'"

provides the matching apostrophe, following the value. When this variable is 
evaluated at runtime, (assuming GroupNumber is "ABC123") it is seen as:

"[GroupNumber] ='ABC123'

Then, because the criteria required for both the Dcount and DoCmd calls is 
the same, we use strCriteria in both places (I think of these situations as 
"one to many" - sound familiar? ie the code is created once and used more 
than once - many)

Does that help any?


0
Stuart
2/6/2008 1:44:32 AM
Reply:

Similar Artilces:

You cannot mark this year as historical year as open year balances exist for it
Hi.. Actually While loading the Data , we didn't marked the Year 2003 as historical year. Hence , when we have loaded the 2003 GL data in the company , it has not transfered the balances to Year 2004. When we try to mark the year as historical year, it is giving the message that "You cannot mark this year as historical year as open year balances exist for it." Kindly suggest how to resolve this problem. Thanks Running the General Ledger Year-End Closing process for 2003 should bring the balances forward for 2004 and make 2003 an historical year. Before performing a y...

No quotation marks allowed in KB articles?
This is fairly insignificant, in the greater scheme of things, but... Is it not possible to use normal (in U.S. English, at least) double quotation marks within a knowledge base article? I've tried entering them (to enclose a bit of quoted text, for instance, or a book title), but when I save the article (without closing it - just save it), the double quotation marks get changes to single quotes. I feel like I need to put [sic] after each instance... Is there a workaround? Special character? This might be a workaround for you: Type two sets of double quotes, and when you save, it l...

xl2003 "cannot save
Windows XP professional Windows 2003 professional Both fully updated with service packs etc as of today. Netware server Load spreadsheet 1.xls from network folder SaveAs as 2.xls to same network folder Same user logged in, same folder, try on different machines. SaveAs works on all machines except a few which give the error: "Cannot save folder marked read only" SaveAs always works on local drive Any ideas ?? I have checked out KB180257 Hi sounds more like a network issue (user access rights, etc.) and not like an Excel error. -- Regards Frank Kabel Frankfurt, Germany iainc ...

How do I turn off. Accent marks in an Access Database.
I have a drop down box that locates records from the dropdown in the main form. This is the code that was put in via Access when I selected the MS options. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[NameLn1] = '" & Me![Combo104] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark I have a business customer that the drop down box will not find. HD's Pizza Cafe I get an end/debug error when this customers name is selected and no record is selected. I noticed that the db added the accent mark wh...

quotation syntax
I am trying to pass a date (now) through a function into an SQL statement. I can't get the double and single quotes to work. What I have now is: " ' " & Now() & " ' " which is read by the function I am passing it to as " ' 10/22/07 18:30:00 ' " and thus fails. This passes directly to SQL so I need '10/22/07 18:30:00' How do I do this? Thanks -- sam Use the #around date/time fields "#" & Now() & "#" "smk23" wrote: > I am trying to pass a date (now) through a function into an SQL ...

using checkmark symbol shows only # not check mark Excel 2003
I am using the Dingbat font. All stars and other symbols are OK, however, when I use the checkmark, or X symbol it only inserts the a number and not the symbol. Thanks. check the obvious - is the column wide enough ? otherwise what have you actually got in the cell ? Steve On Fri, 08 Sep 2006 09:36:02 +0100, Michael Abraham = <MichaelAbraham@discussions.microsoft.com> wrote: > I am using the Dingbat font. All stars and other symbols are OK, howev= er, > when I use the checkmark, or X symbol it only inserts the a number and= = > not > the symbol. Thanks. ...

Quotations
Does anyone know if you can use MS CRM Workflow to create quotes? Basically, we work with manufacturers who have wide product sets with lots of SKU's and to create a quote you have to have certain combinations of SKU's together. Is it possible to put logic into MS CRM to accomodate this? http://www.experlogix.com/solutions.htm "Russell Tewkesbury" wrote: > Does anyone know if you can use MS CRM Workflow to create quotes? Basically, > we work with manufacturers who have wide product sets with lots of SKU's and > to create a quote you have to have certain c...

Adding "Service Marks"
Currently working on a project where the client has requested that a Service Mark be added to a text field - the equivalent of a super- scripted "SM" by the word. Anyone know a [slick?] way to do this? Oko You posted in a "reports" newsgroup, so I'll assume you are trying to do this in a report. The complex way to do this would be to use a complex type of control (?ActiveX control) that would let you add formatting within the text field. The simple way to do this is to add an additional label or text control immediately to the right of your text control and put ...

Schema for Quotation
Hi I am writing program in C# to push Quotation in GP 10 can somebody tell me which are the Schema I have to use to update Quotation Regads Thirumal ------=_NextPart_0001_6F00864F Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Thirumal Everything you need is in the SOP Transaction Flow documentation in the SDK (Software Development Kit). The SDK can be installed from the Tools folder of CD 2 of the install CDs or can be downloaded. See the page below for the links: http://blogs.msdn.com/developingfordynamicsgp/pages/developer-articles.aspx David Musgrave [MSFT] Escalat...

I want to mark a NG post to follow-up
Quite often I see a post that I would like to mark somehow so that when I open the NG in a day or 2 I can easily find that post and view any replies. At the moment the best I can do is scroll down all the posts until I find the one I want. Not very good. Is ther a way to set-up a post so it is easily found or perhaps only marked posts appear first when connecting to that NG. I use Outlook Express 6. regards PeterH Just solved it with "Watch/Ignore" "PeterH" <reply to newsproup@NOSPAM.net> wrote in message news:5DGFc.77185$sj4.47184@news-server.bigpond.net.au...

Exclamation Mark Added to Word "PORT"
Not sure if this is a firewall issue, something to do with our email filter, or an Exchange issue, but I thought I would try this forum first. Our issue is that we have occasions when the word "port" in an email has an exclamation mark added to it through some automatic process. Wondering if anyone has seen this before or may be able to point me in the right direction??? On Wed, 7 Jun 2006 07:34:04 -0700, David Smith <DavidSmith@discussions.microsoft.com> wrote: >Not sure if this is a firewall issue, something to do with our email filter, >or an Exchange issue, but...

Crop Marks
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) I'm using Word Mac 2008, and need to print out a document as a PDF with crop/printer marks. <br><br>Does anyone know how this can be done? Create the PDF with Word, then print with Adobe Acrobat Professional. Settings on the "advanced tab" on Printer setup. --rms www.rmschneider.com On 21/12/09 22:03, jonamara@officeformac.com wrote: > Version: 2008 Operating System: Mac OS X 10.4 (Tiger) I'm using Word Mac > 2008, and need to print out a document as a PDF with crop/printer mark...

apostrophes & quotations garbled
I am running outlook 2000 on win 98SE. When I use quotations or apostrophes in outgoing messages, they aften come out as garbled characters. When I am typing they are fine, but when I look in the sent folder, they are changed. Any suggestions? nelson. ...

Contacts marked as read-only
Even though users are owners of the contacts they are still unable to edit them and the contacts are marked read-only. How do you remove the read-only for contacts? -- pcampbell I am experiencing this same issue. Did you ever get this resolved? "patrick campbell" wrote: > Even though users are owners of the contacts they are still unable to edit > them and the contacts are marked read-only. How do you remove the read-only > for contacts? > -- > pcampbell ...

PO Invoice Posting Journal
There are clients who save their posting journals who wish to in addition to the IV Variance report have the transactions Marked that there were Purchase Price/Cost Variances on the Purchase Order Invoice Posting Journal (when the items received previously cost is different from the Invoiced Cost). The desired issue is to have the report have a check mark indicating in a column that there was a variance when the transaction was posted. Report Writer does not allow this due to the table linking and the customer does not want to pursue Crystal Reports options. ---------------- This post ...

Quotation XML
I have modified my RMS quotation receipt template with several small changes (such as adding the word "Quotation" to the top of the form, and embedding a graphical warranty statement). However, when RMS picks up an entire quote for an order, it doesn't seem to switch the template to my standard invoice. Is there a conditional test that I can place on the quotation template that will switch based on some difference between a quote and actual transaction? Or is there another way? Thanks in advance! Derek, When you convert a quote to a sale it still uses the quote templat...

editing while in mark-up mode
I've had a document reviewed by a friend, who marked-up her comments for my perusal. It seems the ONLY options are to accept or rejects the comments AS IS. How do I review her comments and edit the document as I wish to change things? Again, I want to be able to accept SOME of her comments, edit others, and do some of my own editing at the same time. This seems impossible, as again, the only options I can find are straight accept/reject of the ENTIRE suggestion. I would need to go through all four pages of the document, by accepting/rejecting eliminate EVERY suggestion, DE...

The number of items that are marked as unread in an Exchange 2003 public folder is incorrect after applying SP1
We upgraded from Exchange 5.5 to Exchange 2003 few months ago. After the upgrade we faced the following problem: "The number of items that are marked as unread in an Exchange 2003 public folder is incorrect" After applying 836686 hotfix mentioned in the following article the problem get resolved. http://support.microsoft.com/?kbid=836686 Last weekend we applied Exchange 2003 SP1 and the same problem has reoccurred. When we tried to reinstall the hotfix exchange doesn't and pops up the following error: "Setup has detected that the service pack version of the system installe...

How do I quickly add quotation marks?
I'd like to highlight a phrase and then use a keystroke to add quotation marks at the beginning and end of the phrase (Often I put quotes around just one or two words) Seems like it takes more mouse-manipulation to highlight a phrase than to simply type the quotation marks at the beginning and end? On Dec 11, 10:53=A0am, tgriffin <tgrif...@discussions.microsoft.com> wrote: > I'd like to highlight a phrase and then use a keystroke to add quotation > marks at the beginning and end of the phrase (Often I put quotes around j= ust > one or two words) Whethe...

Request for Quotation
Can we have new screen for request for qoutation to be integrate and can easly convert to PO. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=29918e08-75bb-496a-bf29-9643a3...

Some Quotation Mark
This code support only (Numeric value) can any one covert this code to accept (text value) ================================== The code If DCount("[GoupNumber]", "TblAccomodation", "[GoupNumber] = " & Me.GroupNumber) > 0 Then DoCmd.OpenForm "frmaccomodation", , , "([GoupNumber]=" & Me.GroupNumber & ")" =================================== I think I need some quotation mark but I don't know where can I put them Thank you "a" <a@a.net> wrote in message news:%23KYkk1BaIHA.1208@TK2MSFTNGP05.p...

Marked citations
I accidentally inserted a marked citation to one of my word documents yesterday and now every word document i have shows new paragraph symbols all over the pages as well as page breaks and lines. It also appears in new documents that I try to start. How do I get rid of this? -- rosie To hide nonprinting marks, click the � button on the Home tab (Word 2007) or on the Standard toolbar (Word 97-2003). Alternatively, you can use the Ctrl+Shift+8 shortcut. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "lrd@hotmail.com" <lrdhotmailcom@discus...

Saving txt files with quotation mark delimiters
I have a fixed width data file and need to convert it to a csv file with quotation marks and commas a delimiters. I thought there was an easy way to do this in Excel. I open the file with excel and I can define fields but I cant figure out a way to save the data with quotation marks around the files separated by commas. Is there any easy way to do this. I have 8 files to do this with containing about 20-25K records each. Thanks See http://support.microsoft.com/kb/291296 for a macro... "slipstrm" wrote: > I have a fixed width data file and need to convert it to a c...

Rule to move (not copy) and mark as read (again)
1. I don't want to maintain a message copy in "sent," just in rule specifiied folder. Can I create a rule to 'move' instead of copy sent messages? 2. Repeating Tim's 8/15 post... sent messages are better saved as "read." Is there a way to do this? Outlook 2002 1) no, not at the time of sending. You can run rules later and move them or use the option to save items in the folder with the original item - tools, options, email options, advanced 2) sent messages are not normally marked as 'not read' - they are marked 'read'. Not sure...

Quotation Marks and automatic application thereof
I write quite a bit of dialogue, and the most irritating thing is having to insert quotation marks! I'm a pretty fair touch typist, but I always have to stop and look at quotation marks - they don'd come as automatically tome as other punctuations marks for some reason. I would really love some, more automatic, way of inseting them where required. For example, I'd like to keep on typing, ignoring the quotes then when I get to the end of a para, whatever, go back through it and highlight the bit that needs quotation marks beginning and end, and just click a toolbar ...