Form problem

G

Guest

I have a form I'm trying to create to enter grants. I have a table for grant
organizations, for applicants, for applicant organizations and for grants.
I'd like to be able to pull the name of the applicant organization from that
table when I enter the name of the applicant in the grant form. I'm new to
access so I'm not sure what I'm doing. I tried to create a query with the
grant table, the applicant table and the applicant organization table, but
I'm not sure how to use it in the form to get the name from the applicant
organization table. I have a look-up on the name field when it's entered into
the grant and would like to be able to pull the name of that applicant's
organization into that field on the form. The grant table is in a 1 to many
relationship with the applicant table which in turn is in a 1 to many
relationship with the applicant organization table. It looks like it should
just do it, but it doesn't. I would appreciate any help on this. Thanks
 
G

Guest

In a bas module, declare a name string global:
....
Public gstrName as String
....

On your selection form, in the click event for the submit button:
(assuming you have a textbox named txtName)
....
gstrName = txtName.Text
<load display form>
....

In your display form (in the Form_Load event):
....
Me.RecordSource = "<your query> ... where fldGrantName = '" & gstrGrantName
& "'"

On your display form, set the control source properties to your display
fields for each field name. i.e. if you have a textbox to display the grant
ID, if the grant ID field name is fldGrantID, control source = fldGrantID.

I don't know all your field names, but this process should store the entered
name in a global string and build the record source for the new form from the
name in the global string. The controls on the form will be bound to the
fields in the form record source.

Hope this helps...
 
G

Guest

In a bas module, declare a name string global:
....
Public gstrName as String
....

On your selection form, in the click event for the submit button:
(assuming you have a textbox named txtName)
....
gstrName = txtName.Text
<load display form>
....

In your display form (in the Form_Load event):
....
Me.RecordSource = "<your query> ... where fldGrantName = '" & gstrGrantName
& "'"

On your display form, set the control source properties to your display
fields for each field name. i.e. if you have a textbox to display the grant
ID, if the grant ID field name is fldGrantID, control source = fldGrantID.

I don't know all your field names, but this process should store the entered
name in a global string and build the record source for the new form from the
name in the global string. The controls on the form will be bound to the
fields in the form record source.

Hope this helps...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top