By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,659 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,659 IT Pros & Developers. It's quick & easy.

Please advise to the syntax error for this code. I have tried to correct the problem

P: 4
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command82_Click()
  2. Dim strWhere As String
  3. List58.Selected(i) = False
  4. strWhere*=*"1=1"
  5. If Not*IsNull(Me.List58)*Then
  6. strWhere*=*strWhere*&*"*AND*(SiteName)*="&*Me.List58.Selected
  7. &*"""*"
  8.  
When I tried to compile the code I received syntax error, I've tried to correct this but I have not been able to resolve the issue.

Thank you
Aug 24 '09 #1
Share this Question
Share on Google+
5 Replies


debasisdas
Expert 5K+
P: 8,127
your code looks so strange

what is the use of all those *
Aug 24 '09 #2

P: 4
I am using one list box and 6 combo boxes as options to pull a specific report
Aug 24 '09 #3

P: 4
Those asteriks should not be in the code I cut and pasted and for some reason those were included it should read:
Private Sub Command82_Click()
Dim strWhere As String
List58.Selected(i) = False
strWhere*=*"1=1"
If Not*IsNull(Me.List58)*Then
strWhere*=*strWhere*&*"*AND*[SiteName]*="&*Me.List58


Hopefully these won't be uncluded this time
Aug 24 '09 #4

debasisdas
Expert 5K+
P: 8,127
your code does not have any meaning.

where is the end if of the IF block ?

please do not post any junk code here.
Aug 25 '09 #5

P: 4
the intent is not to post junk code I am new to VB and posted the code that I needed assistance with. If you cannot assist me that's fine but the negative remarks are really not necessary. If I knew the correction for the code I would not need this forum. Thank you
Aug 25 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.