Solved

referencing integers with condition

Posted on 2007-03-29
7
243 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 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

821 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