UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Error On After Update, Access 2016    
 
   
mike60smart
post Jan 27 2020, 12:35 PM
Post#1


UtterAccess VIP
Posts: 13,680
Joined: 6-June 05
From: Dunbar,Scotland


Hi Everyone

The Code below is on an After Update of a Cascading Combobox.

Can anyone spot where I am wrong?

Any help appreciated.

Attached File  error.PNG ( 25.95K )Number of downloads: 15

--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 
DanielPineault
post Jan 27 2020, 12:47 PM
Post#2


UtterAccess VIP
Posts: 7,144
Joined: 30-June 11



It is simply because you have an blank line between the first line and the subsequent line. Delete the blank line (between line 20 and 30) between the 2 and everything will be okay.

Also, you code on line 20 seems off.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
cheekybuddha
post Jan 27 2020, 03:02 PM
Post#3


UtterAccess Moderator
Posts: 12,343
Joined: 6-December 03
From: Telegraph Hill


>> Also, you code on line 20 seems off. <<

Daniel is correct, Mike. your VBA will be confused because of the double quotes within the string - use single quotes instead:
CODE
' ...
20    sSource = "SELECT CustProjectManagerID, CustomerID, PMFirstname & ' ' & PMLastname AS Manager " & _
30              "FROM tblCustomersProjectManagers WHERE CustomerID = " & Me.cboCustomer
' ...


hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 
mike60smart
post Jan 27 2020, 04:57 PM
Post#4


UtterAccess VIP
Posts: 13,680
Joined: 6-June 05
From: Dunbar,Scotland


Hi David

Just works great

Many thanks yet again

cheers.gif x 12

--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 
cheekybuddha
post Jan 28 2020, 06:00 AM
Post#5


UtterAccess Moderator
Posts: 12,343
Joined: 6-December 03
From: Telegraph Hill


Daniel and I are pleased to assist! yw.gif

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    24th February 2020 - 06:58 PM