Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

referencing integers with condition

Posted on 2007-03-29
7
Medium Priority
?
273 Views
Last Modified: 2007-03-29
How could I reference a colon followed by a space and then an integer, such as    : 23    ?
I need to reference all integers that are preceded by a space and a colon.  This is for another vba app.  

0
Comment
Question by:zubin6220
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18815004
in a query?
in VBA?
could there be something after the integer? if yes, what?
0
 
LVL 39

Expert Comment

by:stevbe
ID: 18815020
what do you mean by reference?
0
 
LVL 9

Expert Comment

by:TheSloath
ID: 18815084
WHERE [YourField] LIKE "* :*"
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 

Author Comment

by:zubin6220
ID: 18815253
I have a visio app in which I need to format all numbers on a page that are prefixed with
colon and space.  I will have to look elsewhere (visio) to get the objects etc, but wanted to know from a vba perspective how to reference.  vba is vba?  Sorry if I shouldn't have posted here.  So to put it in 'access' perspective, say I had a text field with values of:
34
: 34
023, etc.
How could I pull out just the numbers prefixed with : space number?  LIKE "* :*" doesn't do it.
0
 
LVL 9

Accepted Solution

by:
TheSloath earned 1100 total points
ID: 18815362
Sorry, in your original question you indicated 'preceded by a space and a colon', if you ra re looking for a 'colon then a space' then:

LIKE "*: *"
0
 
LVL 39

Assisted Solution

by:stevbe
stevbe earned 500 total points
ID: 18815498
assuming the object that contains the data is called objNum ...

you could loop through and remove all of the instances of ": "

For Each objNum in objNums
    objNum = Replace(objNum, ": ", "")
Next
0
 

Author Comment

by:zubin6220
ID: 18815604
I plugged LIKE "*: *" with a query and it worked fine.  Thanks
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question