Scatman
12-05-2001, 11:39 AM
OK the best way to describe what I want to do is Step by step
I want to create a Form that a user can populate with information for a new job. This form should have all the fields that are contained in a Master Table.
The user then puts in a starting record number and an ending record number, clicks on an "ADD NEW PROJECT" button on the form and the record numbers in the master table are populated with the information.
I know that once the user clicks on the add new project button that it has to run an update query. but I am not sure how to create the form with the fields. Should they all be unassigned and then somehow defined to the update query?
jwindon
12-05-2001, 01:30 PM
I kinda understand what you want to do, but I have NO clue why you would want to do it that way.
Your form would be blank for data entry. The PROJECT # (if that is what you are wanting to apply) could be entered as the job information is entered. Each record is added individually and with a unique record number. If you need to have several forms that relate to the SAME job, you need to look at your table structures and consider a one to many relationship used in a form & subform structure.
Clear as mud, I know. Maybe if you explain a bit more.
Scatman
12-07-2001, 08:25 AM
You said in your response that you did not understand why I wanted to do it THAT way?
Is there something easier?
I work for an engineering firm that assigns numbers to individual project sheets. Those numbers are my unique record numbers in my database. So when I am adding a new project, which may have many sheets, I need to update all the information for those records quickly. I thought a form with all the fields in the master table(in Data Entry mode) and a button to run an update query with those values was a quick solution, but I am lost on how to tie the data to the Query.
I hope this explains thing a bit clearer and maybe you can think of a simpler way to do this.
Thanks
jwindon
12-07-2001, 08:48 AM
OK Scatman: Got ya! I worked for an engineering firm for a long time so I think I get the scenerio. The architect calls and changes the project title two hours before specs go out for bid!
Ok, your form would be unbound. Put the controls that you might be changing on it. These should also be unbound.
Project Number:
Project Name:
Date:
The controls should be unbound.
Put a command button on the form that will run the following query. This should be an UPDATE QUERY. Base it off the table that is your MANY side (MANY sheets to ONE project)
qryUpdateProjectInformation
criteria:
UnderProject#: =Forms!frmFormName!ProjectID
update to: leave blank
UnderTitle: =Forms!frmFormName!UnboundControlName
criteria: Is Not Null
etc.
Let me know how this works out for you.
[This message has been edited by jwindon (edited 12-07-2001).]
Scatman
01-07-2002, 06:24 AM
jwindon...What you gave me ALMOST did the trick. I had to tweak it a little but it updats every field perfectly except one.
I have a checkbox field that designated the records as ACTIVE or in other words, in use.
The unbound field I setup for that does not transfer the value to the records...can you help with this?
THANK YOU for your GREAT Idea....
I'm ecstatic to even get it this close
Pat Hartman
01-07-2002, 07:11 PM
I don't think you should bunches of records all at once. What if you add too many? What if you add too few? I think a bound subform where each record is added as it is needed would be the best solution. The columns that link the Master table to the child table should not appear in the subform since they already appear in the mainform. If you set the master/child link between the main and subform properly, Access will automatically populate the common fields. The user just needs to enter the unique fields.