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  

odd subform which is on the one side of a one to many relationship



 
 
Thread Tools Display Modes
  #11  
Old July 28th, 2009, 01:35 AM posted to microsoft.public.access.forms
WindandWater
external usenet poster
 
Posts: 15
Default odd subform which is on the one side of a one to many relation

Bonnie,

So, when I removed the Where clause,
it removed my parameter query which is where I was entering the job number.
I am not clear how to get that value into the append query.

You saw that I had an expression getting the field value of QuicksheetID.
That is the (primary key of Quicksheet), it would be used to to populate the
same
field QuicksheetID FK in jobs table. Inaddition, I have four other fields
that I would
possibly need to populate in the jobs table.

Can anyone recommend what is the best way to do this? I am thinking either
use
parameter query or some sort of unbound fields that I load into the append
query?

Thank you,

Johnny

Right now I am trying to just use my one Ticket form to call an append query
to the jobs table. I do not have a Job number field in the Quicksheet table
to enter the data. This is why I was trying to use the parameter query.





"bhicks11 via AccessMonster.com" wrote:

Johnny

You are going back to where we were before. If you have a subform and you
don't want a job it won't work. Why doesn't the append query work? You were
doing two things in that query - asking for the job number and adding info
from the form? Which do you want to do? If you just want to run an append
query that you give a number to, you can do that. It requires an extra step
but I am not sure were you are going now.

Bonnie
http://www.dataplus-svc.com

WindandWater wrote:
I am so close, but I am missing something.
My objective is a subform with a series of fields
that would be filled out about the job.

So far we have built a query that accoplishes part of that.
I was trying to make the append query be like a parameter
query to ask for the the job number, but actually if I could
build a subform with bound fields to the append query that would be great.
It appears that append querries don't work that way, as I try to
build subforms and controls I don't see the append query.

So, how can I take that query and use it to enter data to the
jobs table?

Thank you so Much!

Johnny

It's the WHERE statement. You don't need a WHERE statement. You are
creating a new record based on the current record in your form. I'm assuming

[quoted text clipped - 38 lines]

Johnny


--
Message posted via http://www.accessmonster.com


  #12  
Old July 28th, 2009, 12:00 PM posted to microsoft.public.access.forms
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default odd subform which is on the one side of a one to many relation

Create a small form with 1 unbound control labeled JobID. Put the code to
run the append query in the OnExit event of that control. In your original
form button, change the OnClick event to open this small form instead of
running the append query. In the query, refer to the unbound control of the
small form for the value of your JobID. Now when you click your button, the
small form with open, you will input the JobID you want, exit the control and
the query will run - adding the JobID and whatever other values you want.

Have you considered making the JobID an autonumber type field?

WindandWater wrote:
Bonnie,

So, when I removed the Where clause,
it removed my parameter query which is where I was entering the job number.
I am not clear how to get that value into the append query.

You saw that I had an expression getting the field value of QuicksheetID.
That is the (primary key of Quicksheet), it would be used to to populate the
same
field QuicksheetID FK in jobs table. Inaddition, I have four other fields
that I would
possibly need to populate in the jobs table.

Can anyone recommend what is the best way to do this? I am thinking either
use
parameter query or some sort of unbound fields that I load into the append
query?

Thank you,

Johnny

Right now I am trying to just use my one Ticket form to call an append query
to the jobs table. I do not have a Job number field in the Quicksheet table
to enter the data. This is why I was trying to use the parameter query.

Johnny

[quoted text clipped - 31 lines]

Johnny


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #13  
Old August 26th, 2009, 09:40 PM posted to microsoft.public.access.forms
WindandWater
external usenet poster
 
Posts: 15
Default odd subform which is on the one side of a one to many relationship

Hello All,

I just wanted to follow up and tell you that I did get this update working.
So, my main form or Parent table is Quicksheets and my child table is
Jobs. Jobs is a subform of Quicksheets. Normally this would be a one to
many, with jobs on the many side of the relationship. In this situation
jobs are on the one side and quicksheet are on the many side.

So, my solution was to make a macro which runs an update query to
add my Primary key jobID to the Quicksheet table. This occurs on the
after update event for the subform Jobs. I don't know if this is the best
event to trigger the Macro. Please let me know if my method seems too
cumbersome or if perhaps my database design is flawed.

Thank you,

Johnny


"bhicks11 via AccessMonster.com" wrote:

Create a small form with 1 unbound control labeled JobID. Put the code to
run the append query in the OnExit event of that control. In your original
form button, change the OnClick event to open this small form instead of
running the append query. In the query, refer to the unbound control of the
small form for the value of your JobID. Now when you click your button, the
small form with open, you will input the JobID you want, exit the control and
the query will run - adding the JobID and whatever other values you want.

Have you considered making the JobID an autonumber type field?

WindandWater wrote:
Bonnie,

So, when I removed the Where clause,
it removed my parameter query which is where I was entering the job number.
I am not clear how to get that value into the append query.

You saw that I had an expression getting the field value of QuicksheetID.
That is the (primary key of Quicksheet), it would be used to to populate the
same
field QuicksheetID FK in jobs table. Inaddition, I have four other fields
that I would
possibly need to populate in the jobs table.

Can anyone recommend what is the best way to do this? I am thinking either
use
parameter query or some sort of unbound fields that I load into the append
query?

Thank you,

Johnny

Right now I am trying to just use my one Ticket form to call an append query
to the jobs table. I do not have a Job number field in the Quicksheet table
to enter the data. This is why I was trying to use the parameter query.

Johnny

[quoted text clipped - 31 lines]

Johnny


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1


 




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 11:43 PM.


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