Solved Get Latest Price Based On User Input To Display On A Form (1 Viewer)

LGDGlen

Member
Local time
Today, 14:05
Joined
Jun 29, 2021
Messages
221
oh hang on its the name for the index...... should have googled it first, sorry
 

LGDGlen

Member
Local time
Today, 14:05
Joined
Jun 29, 2021
Messages
221
So i'm getting the following error:

1635952733362.png


For this line:

Code:
Set rs = CurrentDb.OpenRecordset("PricingSelling", dbOpenTable)

which appears to be a crash of some description. The only difference between my setup and the example is the table i'm trying to open is a linked table and the table exists as a sharepoint list

To investigate further i made a local table copy of the sharepoint list linked table and i don't get this error, so i'm guessing opening a table as a recordset doesn't work with linked sharepoint lists

apologies for drip feeding information as i didn't know there would be an issue with where the table resided/whether the table was linked or local

With the local table though i get the next error:

1635953371213.png


So this goes back to an understanding about what the following line does:

Code:
.Index = "srch_index"

@arnelgp any pointers/ideas would be gratefully received
 

LGDGlen

Member
Local time
Today, 14:05
Joined
Jun 29, 2021
Messages
221
googling further, it does indeed seem you can't open a linked table as a dbOpenTable so seek won't work in this instance :( boooooooo

i would still, if its ok, like to understand that .Index issue though for my own sanity
 

LGDGlen

Member
Local time
Today, 14:05
Joined
Jun 29, 2021
Messages
221
delving a bit deeper as i go, the fundamental bit i'm not getting is where "src_index" is set because i can see it is an index of the table, but i can't see where it is defined.

i get what the line is doing now it is telling the recordset which index to use and when i look at the indexes it shows ID and srch_index

i just don't know how these are setup
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:05
Joined
Sep 21, 2011
Messages
10,853
delving a bit deeper as i go, the fundamental bit i'm not getting is where "src_index" is set because i can see it is an index of the table, but i can't see where it is defined.

i get what the line is doing now it is telling the recordset which index to use and when i look at the indexes it shows ID and srch_index

i just don't know how these are setup
They were set up in the local table example.?
 

LGDGlen

Member
Local time
Today, 14:05
Joined
Jun 29, 2021
Messages
221
1635954895300.png

found it HAZAAAAA!!!!

ok so i see what to do now, not sure it helps because my table is a linked table but still at least i know where it was setup, goodness that was bugging me that i couldn't find where it was configured

apologies for documenting my pain in real time
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:05
Joined
Feb 19, 2013
Messages
14,703
so if you click on the next line down for srch_index - what does it say for Unique? (it should be yes)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:05
Joined
May 7, 2009
Messages
16,826
i have not worked with sharepoint before but
if you can Open the backend and add it to the
database collection, then you can open the table
using OpenTable.

Public Function GetBE() as dao.database
static db as dao.database
if (db is nothing) then
set db=dbengine.workspace(0).opendatabase("thepathtodb")
end if
set GETBE=db
end sub

on your code:

rs = GETBE.Openrecordset("theTable", dbOpenTable")
 

Users who are viewing this thread

Top Bottom