Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

division of length of field in a query

Status
Not open for further replies.

zoonkai

MIS
May 1, 2000
71
US
I'm building a query and one of the fields ("imagelist") is a reference to an image name. (i.e. 00000125 is one image name) some of them have two and three or more images. I would like to be able to do something like this.

lenght of imagelist / 8 = number of pages..

so
00000125 would return "1"

0000012500000126 would return "2"

000001250000012600000127 would return "3"

any help would be greatly appreciated...

I appreciate all the help everyone has give me lately. Thanx!!

Donald
Donald (Zoonkai) Dixon
donnan@don-nan.com
 
I created a very small function that will display the number of pages:
Code:
Public Function fncCntPages(strIn As String)
    Dim intNumPages As Integer
    Dim result As Integer
    
    intNumPages = Len(strIn) / 8
    
    result = MsgBox("The total is " & intNumPages, vbOKOnly)
    
End Function
[code]
You can modify this or just use the idea to help you out...
 Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
Glad you figured it out and sorry I didn't notice you wanted to do this in a query... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top