'strValues = qdTemp.Fields(0) & " - " & qdTemp.Fields(1) & " " & strValues 'displays the agents name MsgBox "No Current Users.", vbInformation, "No Users" Set qdTemp = CurrentDb().OpenRecordset(sSQL) I have a form with a command button to display the records. My be has a link to this table so I can query. By 'signed in' I mean I add them to a table along with some other info for tracking. When the fe opens on the users desktop they are signed in user their network id. I have a fe/be setup and this works fine. Can't find a thing to go off of on my searches. I just want to pull the info from the code instead of a table or query. This doesn't seem like it should be this hard. putting =ShowUserRosterMultipleUsers() for the control source. Now I have tried using unbound textboxes. I do not want to open the editor when I need to do this. type ?ShowUserRosterMultipleUsers in the intermediate window and get the results. 'Output the list of all users in the current database.ĭebug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _ĭebug.Print rs.Fields(0), rs.Fields(1), _ Set rs = cn.OpenSchema(adSchemaProviderSpecific, _ ' listed in ADO's type library for schema rowsets ' reference the schema, as provider-specific schemas are not ' The user roster is exposed as a provider-specific schema rowset Change the definition of Customer_Table toĭbTable(Customer_Number, Customer_Field) = Re-evaluate Customer_ "Provider=.4.0 " _.
Index tmp := DbLabels(Customer_Number) do subset(tmp "CustomerID") Change the definition of Customer_Field to:.Create a new index node, name it CustomerID, defined as:ĬopyIndex(DbTable(Customer_Number,"CustomerID")).The data is now imported (as shown below).įor convenience, we may want to use the CustomerID column of the table as the row index. Drag a variable node to the diagram, name it Customer Table, and define it as:.Drag another index node to the diagram, name it Customer Field, define it as:.Drag an index node to the diagram, title it Customer NumberĭbQuery("DSN=Northwind", sql: "select * from Customers")Īt this point, if you've done things correctly, you'll see an index from 1 to 91 (or however many records are present in your own Customers table).Now you will create the query in an Analytica model. With this datasource, we can query any of the tables in the Northwind database. Now we have a data source named Northwind that we can connect to using DbQuery. Press OK to complete the Data Sources dialog.button, and navigate to the Northwind.mdb database file identified earlier. Press Add., select Microsoft Access Driver ( *.mdb)ĭata Source Name: Northwind Description: Sample database from Microsoft Access.Start → Control Panel → Administrative Tools → Data Sources (ODBC).Here you will set up a DSN for the Northwind database, which will allow you to connect to it by name from DbQuery. Click through this and examine the list of Tables. After opening in Access, it may display an introduce dialog.If you don't have a local copy, the database can be downloaded from Microsoft Templates at this link.Select File → Open., and find the Northwind.mdb file, usually at:Ĭ:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb.First, locate this database on your computer and view it in Access:
Microsoft Access 2000 and later includes a sample database called Northwind that we will use for this exercise. This mini-tutorial takes you through a step-by-step process of connecting to and querying data from a Microsoft Access database using DbQuery.