ms-access


MS Access Syntax error


here is my code:
Text22 = DLookup("[Program_No]", "1_Supportive_Housing", "[Program_Name] = '" & Replace([Me.Program_Name], "'", "''") & "' And [BudgetYear] = " & [Me.BudgetYear])
I am not sure what is wrong with it, but it keeps giving me the following error:
Can't find the field | in your expression
I have been trying to get rid of this error but nothing works.
OnKeyPress, this event triggers. As the user writes, it should be able to lookup the value in the table and assign it to text22.
Looks like you want to reference to form fields [Me.Program_Name] & [Me.BudgetYear], but Access tries to find fields with exactly this name, including "Me." prefix. Try to remove brackets at all, or use Me.[Program_Name] and Me.[BudgetYear] instead.

Related Links

Uniqueness Constraints in MS Access
Application Icon path in MS Access
Microsoft access is a mere file or data-base server
Is ACE/Jet's IN operator or CHECK constraint 'broken'?
Form.CurrentRecord=1 and Form.RecordSet.Absoluteposition=-1
email using Access and VBA without MAPI
MS Access Properties
Will Access support 35- 40 users writing to a Access database
Trying to limit input on a field
Sorting by month in MS Access
How to add a menu item to the default right click context menu
ASP Access Database web site on Windows 2008 Server running IIS 7
How to populate field descriptions in MS Access
Version control for VBA file
Mystery HAVING clause
MS Access 2003 - Sparkline Graphs in Microsoft Access

Categories

HOME
ionic-framework
blogger
proxy
pycharm
kde
grep
mean-stack
xmpp
cvs
malloc
microservices
jsrender
callback
gitpitch
cloudkit
fortumo
circuit
quartz-scheduler
lombok
telephony
google-static-maps
reactive-cocoa
physics-engine
orleans
sox
tapestry
realex-payments-api
devops
icloud-api
android-widget
h2db
bootstrap-duallistbox
kannel
traffic
bootstrap-material-design
typo3-6.2.x
opentype
log4js-node
libssl
galsim
semantic-versioning
perlin-noise
lxd
avcapturesession
y86
mapbox-gl
host
revolution-slider
dartium
botbuilder
nomethoderror
android-mediaprojection
sencha-touch-2.3
qcombobox
qsslsocket
errordocument
paxos
dropbox-php
mu
svmlight
carrot
knockout-components
nodebb
gcsfuse
webdriverjs
cubes
setuptools
static-ip-address
grails-tomcat-plugin
file-writing
underscore.js-templating
google-web-starter-kit
hill-climbing
bgp
captivenetwork
unity-networking
iad
xna-4.0
thredds
simple-framework
cakephp-3.1
kineticjs
csquery
nsmutabledictionary
fscommand
gwidgets
onactivityresult
zend-route
funcunit
expected-exception
meteor-velocity
typo3-neos
flexmojos
mysqltuner
blending
android-screen-support
mqx
enterprisedb
kyotocabinet
gil
automount
multipage
nsmanagedobject
buildr
assembly-loading
bigcouch
mod-auth
xmemcached
inotifycollectionchanged
oncheckedchanged
iphone-web-app
filtered-index
compiler-specific
avatar
caching-application-block

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App