If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Home Version Access
I purchased a home version of Access from Microsoft through my job, and when
I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If |
#2
|
|||
|
|||
Home Version Access
I'm surprised it recognizes that in any version.
What is NameThings? If it's an open form, that should be Forms![NameThings]![NameLOOK] If it's a table, you need to use a DLookup: DLookup("[NameLOOK]", "[NameThings]") If it's a recordset, you need to use NameThings!NameLOOK -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "accessdesigner" wrote in message ... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If |
#3
|
|||
|
|||
Home Version Access
It's a query, and field name,... i was surprised too that i didnt work,
because it worked at work.... "Douglas J. Steele" wrote: I'm surprised it recognizes that in any version. What is NameThings? If it's an open form, that should be Forms![NameThings]![NameLOOK] If it's a table, you need to use a DLookup: DLookup("[NameLOOK]", "[NameThings]") If it's a recordset, you need to use NameThings!NameLOOK -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "accessdesigner" wrote in message ... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If |
#4
|
|||
|
|||
Home Version Access
you can't return a value from a query that way, unless the query is bound to
the form that the code is running from (in which case, all you'd need is the field reference, as ruralguy pointed out). if the query NameThings only returns one record, then you can retrieve the value of the NameLOOK field with a DLookup() function as described by Doug Steele, and assign it to Me.NameList; otherwise, you're going to need to apply criteria in the DLookup() to retrieve the appropriate record from the query. hth "accessdesigner" wrote in message ... It's a query, and field name,... i was surprised too that i didnt work, because it worked at work.... "Douglas J. Steele" wrote: I'm surprised it recognizes that in any version. What is NameThings? If it's an open form, that should be Forms![NameThings]![NameLOOK] If it's a table, you need to use a DLookup: DLookup("[NameLOOK]", "[NameThings]") If it's a recordset, you need to use NameThings!NameLOOK -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "accessdesigner" wrote in message ... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If |
#5
|
|||
|
|||
Home Version Access
I apologize for jumping into the middle of this discussion. I am lookinng to
find out if I can purchase just access alone? I have student home and office 2007. Acces is the only program I need to get. And if I can, does any one know where? I cannot fint it by itself on the MS website. "tina" wrote: you can't return a value from a query that way, unless the query is bound to the form that the code is running from (in which case, all you'd need is the field reference, as ruralguy pointed out). if the query NameThings only returns one record, then you can retrieve the value of the NameLOOK field with a DLookup() function as described by Doug Steele, and assign it to Me.NameList; otherwise, you're going to need to apply criteria in the DLookup() to retrieve the appropriate record from the query. hth "accessdesigner" wrote in message ... It's a query, and field name,... i was surprised too that i didnt work, because it worked at work.... "Douglas J. Steele" wrote: I'm surprised it recognizes that in any version. What is NameThings? If it's an open form, that should be Forms![NameThings]![NameLOOK] If it's a table, you need to use a DLookup: DLookup("[NameLOOK]", "[NameThings]") If it's a recordset, you need to use NameThings!NameLOOK -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "accessdesigner" wrote in message ... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If |
#6
|
|||
|
|||
Home Version Access
"accessdesigner" wrote in message
... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If There is no "home version" of Access and your syntax is incorrect. When square brackets are required they need to go around each reference "piece" not around the outside as you have them. If Me.NameList = [NameThings].[NameLOOK] Then... or since your names don't actually require the brackets... If Me.NameList = NameThings.NameLOOK Then -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#7
|
|||
|
|||
Home Version Access
when i used ......If Me.NameList = [NameThings].[NameLOOK] Then... an error
message read .....MS ACCESS CAN'T FIND THE FIELD 'l' REFERRED IN YOUR EXPRESSION when i used ..... If Me.NameList = NameThings.NameLOOK Then...an error message read... OBJECT REQUIRED when i said home version of MS Access... its a version of MS software that MS allows employees of other companies, such as mine, to purchase for home use.... (Microsoft Home Use Program,... this product is not for resale) "Rick Brandt" wrote: "accessdesigner" wrote in message ... I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If There is no "home version" of Access and your syntax is incorrect. When square brackets are required they need to go around each reference "piece" not around the outside as you have them. If Me.NameList = [NameThings].[NameLOOK] Then... or since your names don't actually require the brackets... If Me.NameList = NameThings.NameLOOK Then -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#8
|
|||
|
|||
Home Version Access
I don't know what a "Home Version" of Access could possible be other than a
retail version of Access. It is probably a later version than you are using at work. Each version released was a little less forgiving that the prior version. I believe the correct syntax is: If Me.NameList = [NameThings].[NameLOOK] Then If [NameThings] is the name of a table bound to the form you are working on then I think: If Me.NameList = [NameLOOK] Then ...will work as well. accessdesigner wrote: I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com |
#9
|
|||
|
|||
Home Version Access
Okay... too much emphasis on the use of the word home version... through my
job, I purchased the right to use MS Access on my home computer.. they mailed me the software...im using it at home. however, when i practice using Access at home, the same thing I did at work, doesnt work here at home... when i used ......If Me.NameList = [NameThings].[NameLOOK] Then... an error message read .....MS ACCESS CAN'T FIND THE FIELD 'l' REFERRED IN YOUR EXPRESSION when i used ..... If Me.NameList = NameThings.NameLOOK Then...an error message read... OBJECT REQUIRED Im trying to get a combobox selection from a form to match what is in my query named NameThings, under the NameLOOK field... "ruralguy via AccessMonster.com" wrote: I don't know what a "Home Version" of Access could possible be other than a retail version of Access. It is probably a later version than you are using at work. Each version released was a little less forgiving that the prior version. I believe the correct syntax is: If Me.NameList = [NameThings].[NameLOOK] Then If [NameThings] is the name of a table bound to the form you are working on then I think: If Me.NameList = [NameLOOK] Then ...will work as well. accessdesigner wrote: I purchased a home version of Access from Microsoft through my job, and when I tried the following statement using the home version of Access, it wont recognize [NameThings.NameLOOK] as being correct, but it works at work: (why?) Dim strwhere As String strwhere = "" If Not IsNull(Me.NameList) Then If Me.NameList = [NameThings.NameLOOK] Then strwhere = strwhere & Me.NameList End If End If -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com |
#10
|
|||
|
|||
Home Version Access
Sorry to pound on you for the "Home Version" thing. Thankfully, Granny set
us all straight. Is the query NameThings bound to your form? accessdesigner wrote: Okay... too much emphasis on the use of the word home version... through my job, I purchased the right to use MS Access on my home computer.. they mailed me the software...im using it at home. however, when i practice using Access at home, the same thing I did at work, doesnt work here at home... when i used ......If Me.NameList = [NameThings].[NameLOOK] Then... an error message read .....MS ACCESS CAN'T FIND THE FIELD 'l' REFERRED IN YOUR EXPRESSION when i used ..... If Me.NameList = NameThings.NameLOOK Then...an error message read... OBJECT REQUIRED Im trying to get a combobox selection from a form to match what is in my query named NameThings, under the NameLOOK field... I don't know what a "Home Version" of Access could possible be other than a retail version of Access. It is probably a later version than you are using [quoted text clipped - 21 lines] End If End If -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200611/1 |
|
Thread Tools | |
Display Modes | |
|
|