A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Very basic form/sub-form question



 
 
Thread Tools Display Modes
  #1  
Old October 21st, 2009, 02:23 PM posted to microsoft.public.access.forms
Marc T
external usenet poster
 
Posts: 35
Default Very basic form/sub-form question

Hi,

I have two tables, one is a linked table from an external database, and the
other is a selection of field for manual entry (to be read alongside the
linked table).
e.g. Linked table has drawing number, revision, title & manual table has
transmittal number and comments.

What I'm trying to do is have a form that gives the detail from the linked
table above, and has a subform for entry of info into the manual table.

Ideally I'd like the main form body to have some way of selecting a record
(combo box?) rather than going through records using the arrows at the bottom
of the form as there can be several hundred possibly.

I've tried this a few ways, but can only seem to get it to work if I have
document number and revision as combo boxes with their own queries attached
(makes it very slow).

Any advice would be much appreciated!
Marc

  #2  
Old October 21st, 2009, 03:58 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Very basic form/sub-form question

How depends on what, and you've not provided much description on your
underlying table/data structure. For example, I can't puzzle out how the
two tables are related ... what common data do they share?

Yes, you can use a combobox (unbound) in the header of your form, listing
possible records (just enough info to allow the user to pick the right one).
Use a query to 'feed' the form, and in the query, point to the combobox for
the recordID.

In the combobox's AfterUpdate event, use something like:

Me.Requery

The way this setup works is:
* The form opens, uses its query, which finds nothing in the combobox, so
loads "that" record (i.e., nothing).
* The user selects a record from the combobox.
* The combobox's AfterUpdate event fires, telling the form to requery,
causing the query to look (again) at the combobox, which now has a value.
* The form loads the record selected.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Marc T" wrote in message
...
Hi,

I have two tables, one is a linked table from an external database, and
the
other is a selection of field for manual entry (to be read alongside the
linked table).
e.g. Linked table has drawing number, revision, title & manual table has
transmittal number and comments.

What I'm trying to do is have a form that gives the detail from the linked
table above, and has a subform for entry of info into the manual table.

Ideally I'd like the main form body to have some way of selecting a record
(combo box?) rather than going through records using the arrows at the
bottom
of the form as there can be several hundred possibly.

I've tried this a few ways, but can only seem to get it to work if I have
document number and revision as combo boxes with their own queries
attached
(makes it very slow).

Any advice would be much appreciated!
Marc



  #3  
Old October 21st, 2009, 04:01 PM posted to microsoft.public.access.forms
Marc T
external usenet poster
 
Posts: 35
Default Very basic form/sub-form question

Something else has dawned on me...

Within the manual entry table I need to restrict the data to unique entries.
Not quite as straightforward as I would hope though...

The unique value within the linked table is a combination of three
fields.... and I need the manual entry table to be restricted to one entry
per combination of these three fields.

Any ideas on this as well?
Thanks!

"Marc T" wrote:

Hi,

I have two tables, one is a linked table from an external database, and the
other is a selection of field for manual entry (to be read alongside the
linked table).
e.g. Linked table has drawing number, revision, title & manual table has
transmittal number and comments.

What I'm trying to do is have a form that gives the detail from the linked
table above, and has a subform for entry of info into the manual table.

Ideally I'd like the main form body to have some way of selecting a record
(combo box?) rather than going through records using the arrows at the bottom
of the form as there can be several hundred possibly.

I've tried this a few ways, but can only seem to get it to work if I have
document number and revision as combo boxes with their own queries attached
(makes it very slow).

Any advice would be much appreciated!
Marc

  #4  
Old October 22nd, 2009, 09:18 AM posted to microsoft.public.access.forms
Marc T
external usenet poster
 
Posts: 35
Default Very basic form/sub-form question

hi Jeff,

thanks for the reply!

The linked table contains information on documents in our ERP system (doc
number, revision, sheet, title etc). The manual input table I have set up in
Access also has doc number, revision and sheet along with a series of
additional fields for the user to add further information.

The number of records returned within the linked table can actually be in
the thousands, which was causing my problem before.
From what you've said below I'm gathering that setting a combo box that way
will only update the form once a value is selected correct? I'll give it a go
and see how I get on.

Many thanks!

"Jeff Boyce" wrote:

How depends on what, and you've not provided much description on your
underlying table/data structure. For example, I can't puzzle out how the
two tables are related ... what common data do they share?

Yes, you can use a combobox (unbound) in the header of your form, listing
possible records (just enough info to allow the user to pick the right one).
Use a query to 'feed' the form, and in the query, point to the combobox for
the recordID.

In the combobox's AfterUpdate event, use something like:

Me.Requery

The way this setup works is:
* The form opens, uses its query, which finds nothing in the combobox, so
loads "that" record (i.e., nothing).
* The user selects a record from the combobox.
* The combobox's AfterUpdate event fires, telling the form to requery,
causing the query to look (again) at the combobox, which now has a value.
* The form loads the record selected.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Marc T" wrote in message
...
Hi,

I have two tables, one is a linked table from an external database, and
the
other is a selection of field for manual entry (to be read alongside the
linked table).
e.g. Linked table has drawing number, revision, title & manual table has
transmittal number and comments.

What I'm trying to do is have a form that gives the detail from the linked
table above, and has a subform for entry of info into the manual table.

Ideally I'd like the main form body to have some way of selecting a record
(combo box?) rather than going through records using the arrows at the
bottom
of the form as there can be several hundred possibly.

I've tried this a few ways, but can only seem to get it to work if I have
document number and revision as combo boxes with their own queries
attached
(makes it very slow).

Any advice would be much appreciated!
Marc



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.