[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Access WON'T recononize some fields when writing code

Posted on 1998-08-31
6
Medium Priority
?
287 Views
Last Modified: 2011-10-03
On a form I have a command button that I'm writing code for.  What I need for this button to due is to open one table and compare it to records in a second table.  The problem I'm having and it's stumping me b/c it seems like a bug is that Access will recognize some of the fields in both tables but it won't recognize the others.  Even if just try to write code for just one of the tables it will recognize the first field in my table but none of the others???  Any ideas???

Thanks,
Kerry
0
Comment
Question by:fleiger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:SPECIALIST
ID: 1960795
Hi,

The only thing I can think of is how do you label your fields?

if you have field such as   Date of month   you need to reference it as [date of month].

Any fiel that has a space is required to be in brackets. also make sure they are properly referenced as recordset.

Specialist
0
 

Author Comment

by:fleiger
ID: 1960796
My fields are labeled
sName
iRoomNum
iBedNum
sSSN

ect... I'm not using any spaces in the names of my fields nor my tables, that's why I'm confused.

Thanks anyways,
Kerry
0
 
LVL 1

Expert Comment

by:mogray
ID: 1960797
fleiger,

Let's see the code you are using.


Wayne
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:kaldrich
ID: 1960798
Kerry, does the format of your fields in one table match the format of the comparable field in the second table?  This may be a dumb question, but I have seen a lot of people compare dates to text.  Let me know
0
 
LVL 1

Accepted Solution

by:
st earned 300 total points
ID: 1960799
You can try these:

.
Table1.MoveFirst
Table2.MoveFirst
If StrComp(Table1("sName"), Tabel2("sName") , 0) = 0 then
.
end if
.
.

OR try these:

Table1.MoveFirst
Table2.MoveFirst
If Format(Table1("sName"))=Format(Tabel2("sName") ) then
.
end if
.
.


0
 

Author Comment

by:fleiger
ID: 1960800
The problem was actually easier than I anticipated but I'll give ya the points anyways.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question