• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Access WON'T recononize some fields when writing code

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
fleiger
Asked:
fleiger
1 Solution
 
SPECIALISTCommented:
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
 
fleigerAuthor Commented:
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
 
mograyCommented:
fleiger,

Let's see the code you are using.


Wayne
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
kaldrichCommented:
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
 
stCommented:
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
 
fleigerAuthor Commented:
The problem was actually easier than I anticipated but I'll give ya the points anyways.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now