Solved

referencing integers with condition

Posted on 2007-03-29
7
263 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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 275 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 125 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

617 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