T
Tim Rogers
I'm a little confused about the Access Forms paradigm.
1) Is a form supposed to be specifically connected only to a
particular table or query? It appears this might be the case since I
have to supply one table or query when I want to create a new form.
Here is what I am trying to do: I have a form that I have created and
it is tied to a table called Humans. I also want to put a Text Box on
the form that will contain a field from a table called Groups. There
is a field in Humans that is a foreign key to the Groups table. The
Groups table has a primary key (long) field and a Description field.
I am trying to display the Groups description field for the record
that is associated with the currently displayed Humans record. I
attempted to create a SQL statement that would provide me with that
information, but I keep getting a #Name? in the Text Box.
I assume what I am trying to do is possible. The latest incarnation
of my query is:
select DISTINCTROW Groups.Description FROM Groups WHERE Groups.GroupId
= [TestForm]![GroupId].Text
2) Do forms always have to have those controls on the bottom that
allow you to iterate through the records in the table/query that the
form represents? I guess I'm a little confused because it doesn't
appear that you can/should create a blank form, create the fields that
you want, and push/pull data to/from the tables as you please like you
would do with MFC, ASP, etc and a separate database like SQL Server.
(It just appears that forms and the tables/queries are so tightly
coupled.) I'm sure you can achieve this, it just doesn't appear
that's part of the normal Access forms paradigm. Maybe I am wrong.
If someone would please point me in the right direction on these two
points, I would appreciate it.
Thanks,
Tim Rogers
1) Is a form supposed to be specifically connected only to a
particular table or query? It appears this might be the case since I
have to supply one table or query when I want to create a new form.
Here is what I am trying to do: I have a form that I have created and
it is tied to a table called Humans. I also want to put a Text Box on
the form that will contain a field from a table called Groups. There
is a field in Humans that is a foreign key to the Groups table. The
Groups table has a primary key (long) field and a Description field.
I am trying to display the Groups description field for the record
that is associated with the currently displayed Humans record. I
attempted to create a SQL statement that would provide me with that
information, but I keep getting a #Name? in the Text Box.
I assume what I am trying to do is possible. The latest incarnation
of my query is:
select DISTINCTROW Groups.Description FROM Groups WHERE Groups.GroupId
= [TestForm]![GroupId].Text
2) Do forms always have to have those controls on the bottom that
allow you to iterate through the records in the table/query that the
form represents? I guess I'm a little confused because it doesn't
appear that you can/should create a blank form, create the fields that
you want, and push/pull data to/from the tables as you please like you
would do with MFC, ASP, etc and a separate database like SQL Server.
(It just appears that forms and the tables/queries are so tightly
coupled.) I'm sure you can achieve this, it just doesn't appear
that's part of the normal Access forms paradigm. Maybe I am wrong.
If someone would please point me in the right direction on these two
points, I would appreciate it.
Thanks,
Tim Rogers