LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default If-Then Help! Simple Situation it seems

This question is hard to explain so i will show you an example:

dim strng as string

Set find = CurrentDb.OpenRecordset("Name", dbOpenDynaset)
find.MoveFirst

If chkJob.value = -1 Then
If Len(strng) = 0 Then
strng = "find!title = " & cboJobtitle
Else
strng = strng & " AND find!title = " & cboJobtitle
End If
End If

If chkyears.value = -1 Then
If Len(strng) = 0 Then
strng = "find!yrs = " & txtYrs
Else
strng = strng & " AND find!yrs = " & txtYrs
End If
End If
..
..
..
Do Until find.EOF
If strng Then
ReDim Preserve names(x)
names(x) = find!id
x = x + 1
End If
loop


Im getting a data type runtime error#13 at the bottom where it trys to
do the "if strng then" within the loop. Does anyone have any
suggestions. it would help me out alot.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Should I do in this situation Dave[_11_] New Users to Excel 5 August 20th 09 06:07 PM
Time Situation Jafferi[_2_] Excel Worksheet Functions 1 June 15th 09 08:12 AM
Nested IF in this situation Cossminnn Excel Worksheet Functions 6 May 20th 06 11:45 AM
need help with a If=then situation. FireBrick Excel Programming 3 May 2nd 05 03:58 PM
Best function for my situation phil si Excel Worksheet Functions 1 November 16th 04 10:49 AM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"