Knutjo
01-24-2002, 12:00 AM
How can I use a "system table" (one record) in my form without connecting it to other tables with relationship declaration ?
|
View Full Version : Using "system tables" Knutjo 01-24-2002, 12:00 AM How can I use a "system table" (one record) in my form without connecting it to other tables with relationship declaration ? Rich 01-24-2002, 01:17 AM Not sure what you mean by system table but try DLookup Knutjo 01-24-2002, 05:15 AM What I mean with "system table" is a table where you have only one record. On That record I can keep fields for "next ordernr", "next invoice number" etc. Pat Hartman 01-24-2002, 05:28 AM I don't understand your question. You don't need to declare any relationships at all if you don't want to. If your question is "how can I display data from two tables on the same form", then the answer is base the form on a query and include both tables with an appropriate join line connecting them. In this case, the second table has only a single row and does not contain a key field by which to connect it to the form's main table. You can create a cartesian product by including both tables in the query and not using any join lines. This will give you the ability to update this "system" table in code. Or, you can use Rich's suggestion and use a DLookup(). However, in that case, you would need to run an update query to update the "next number" before you assigned it to the current row. If you have not wrapped the whole process in a transaction, it is imperative that you update the "system" table prior to actually using your user assigned number. You must trap any error that occurs because of multiple update attempts to this table. If you don't do this, two users may be given the same "next number". |