Solved

referencing integers with condition

Posted on 2007-03-29
7
209 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 142

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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained 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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now