editing a query

I have two tables - tblPeople and tblBooking. Referential Integrity is set
from tblPeople to tblBooking on the Client_ID field, which is an AutoNumber
data type. I created a query with these tables. When try to add new data, I
am only able to enter data in the fields of the tblPeople table. To enter in
the tblBooking table fields, I first need to type something in any of the
existing rows of that field and then type in the new record. Does anyone have
any ideas of what I need to do to be able to enter new data?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200705/1

0
cmtrain
5/23/2007 7:14:40 PM
access.queries 6343 articles. 1 followers. Follow

2 Replies
590 Views

Similar Articles

[PageSpeed] 19

Don't access these tables through this query.  Create a form with
tblPeople as the record source, then create a subform on the form that
you just created and use tblBooking as the recordsource and link the
two forms on the Client_ID Field.  This will work much better.

Any questions, don't hesitate to past back.

Cheers,
Jason Lepack

On May 23, 3:14 pm, "cmtrain via AccessMonster.com" <u3580@uwe> wrote:
> I have two tables - tblPeople and tblBooking. Referential Integrity is set
> from tblPeople to tblBooking on the Client_ID field, which is an AutoNumber
> data type. I created a query with these tables. When try to add new data, I
> am only able to enter data in the fields of the tblPeople table. To enter in
> the tblBooking table fields, I first need to type something in any of the
> existing rows of that field and then type in the new record. Does anyone have
> any ideas of what I need to do to be able to enter new data?
>
> --
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200705/1


0
Jason
5/23/2007 7:42:26 PM
cmtrain via AccessMonster.com wrote:

>I have two tables - tblPeople and tblBooking. Referential Integrity is set
>from tblPeople to tblBooking on the Client_ID field, which is an AutoNumber
>data type. I created a query with these tables. When try to add new data, I
>am only able to enter data in the fields of the tblPeople table. To enter in
>the tblBooking table fields, I first need to type something in any of the
>existing rows of that field and then type in the new record. Does anyone have
>any ideas of what I need to do to be able to enter new data?


You should not be using a query to enter/edit data.  This is
especially true if the query is based on more than one
table.

Instead you should be using a form based on the people table
and a subform based on the booking table.

Regardless of how you approach it, the people table record
must be saved before you can add a new record to the booking
table.  You have seen this when you cause a new people
record to be saved by clicking on another record and
clicking on a booking field in the "new" record.  If you use
a main form, subform arrangement, the main form record is
automatically saved as soon as you click/tab to a subform
control (field).
 
-- 
Marsh
MVP [MS Access]
0
Marshall
5/23/2007 7:46:13 PM
Reply:

Similar Artilces:

Editing Text when using Publisher as a web page...
I'm using Publisher to document the status of current taskings in the office. I'm trying to ger Publisher to allow people that pull up the web-page to add and edit text on the web page so we can keep everything up to date. Right now, someone has to come to me and tell me the changes, then I change the info in the Pub doc, then I have to repost the web-page. Is there a way for people to edit the text on the web-page when they pull it up. I have text boxes in there now that people can edit, but the text doesn't update when you close the page and re-open it. Please Help if you ...

Selection query
In a column of a couple of thousand addresses, I want to copy to a new spreadsheet all of the entries (in that column only) that fullfill the criteria of 'nnn Short St" where nnn is any number from 1 to 9,999. I also want to sort them by number, should that be a seperate subsequent process on the new list of entries? Thanks for any pointers. Brian Tozer Hi maybe the following addin will help you: http://www.rondebruin.nl/easyfilter.htm -- Regards Frank Kabel Frankfurt, Germany KiwiBrian wrote: > In a column of a couple of thousand addresses, I want to copy to a new > ...

SQL Server 2000 Standard Edition vs SQL 2000 Personnel Edition
I am using SQL server 2000 standard Edition sp3 with Gp 9 Sp3, I am planning to move GP with database to new server different hardware. can I use sql 2000 personnel edition sp3 or should I use same old version. I hope u understand my question. MK KSA Generally speaking, personal editions are not robust enough to support a product like GP. I would stay away. -- Richard L. Whaley Author / Consultant / MVP 2006-2008 Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com "MK KSA&quo...

Access can not find a table in append query
Hi all, I have a table called MyCustomers. For some reason, when I try to create Append query, it doesnt show on the list of tables. I know the the table is there and I can select it if I want to create a different type of query but not append. What can cause that? TIA, Tom Does your table have a PRIMARY KEY defined? -- Bob Larson Access World Forums Super Moderator Utter Access VIP Tutorials at http://www.btabdevelopment.com __________________________________ If my post was helpful to you, please rate the post. "Tom" wrote: > Hi all, > > I have a table call...

editting auto recovery
Hello, is it possible to change the auto recovery directory just for one document and is also possible to ensure that the auto recovery file is not deleted after the file is closed? Cheers Hi AFAIK this is not possible. But you may consider using the following add-in: http://www.jkp-ads.com/Download.htm (look for AutoSafe.zip, not autosafeVBE.zip, for your purposes.) -- Regards Frank Kabel Frankfurt, Germany Hcoms wrote: > Hello, > > is it possible to change the auto recovery directory just for one > document and is also possible to ensure that the auto recovery file > ...

BOM & Edit List
Hi, I created an Assembly transaction and printed it from the Assembly transaction entry window before posting it. In the posting journal that prints it does not print the Assemble cost, extended assemble cost, Unit cost of the components and the extended cost. But if i post the transaction then the same posting journal is printed with the costs. Why does it not print? Please let me know Thanks Dev It only pulls posted costs, like other Great Plains edit lists including items. You will need to modify the report to include costs. "Dev" wrote: > Hi, > > I created...

template edit question, add more? edit template?
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel i'm using a resume template and it's beautiful, but only allows four job positions before it moves one the education, etc. <br><br><i>guess theres a way to do it on the pc version, but with mac, how do i insert an addition formatted block? it will only let me work within the template currently.</i>&#32;<br><br><i>hope that makes sense, thanks for the help!</i> Mac or PC makes no difference � it's a matter of how the template is constructed. With...

How to edit entitys attributes directly?
I messed up with entity mappings and ended up with errror: attribute not found. How can I manually remove attribute from entity? Tried export -edit -import but it seems not to be the right way. You will first need to remove the "bad" mapping that you created. Since it is referncing the field, you need to do that prior to trying to remove the field. You also need to remove it from any forms & views that may be displaying it. The customization Import will not remove fields (as you have discovered). That is done as a safety feature to rpevent accidental loss of data (ima...

Editing
Hi! Could you please tell me how to remove a linked transaction within the budget planner. For example, I have a double entry under the debt category. ...

Macro to edit details
Hi, i am currently trying to create a macro regarding editing staf details on a worksheet....... therefore i recorded a macro and named it editstafflist, i highlighte my headings...and then went to 'data > form' and then had to close th form and then stop my macro. It wouldnt allow me to stop my macr whilst the dialogue box was open. Anyways after stopping the macro drew out a button and assigned this 'editstafflist' macro to it. saved my sheet and then clicked on the button, but a error '1004' kep occuring, can anyone please help me on this as i am rather stuck ...

editing a drop down #2
that's not one of my choices. -- kateweb ------------------------------------------------------------------------ kateweb's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=16301 View this thread: http://www.excelforum.com/showthread.php?threadid=276931 what do you mean by this .. is it greyed out on the toolbar or shows "any value"? if you'ld like to tell me where you downloaded it from i can go have a look at it cheers JulieD "kateweb" <kateweb.1fictb@excelforum-nospam.com> wrote in message news:kateweb.1fictb@excelfor...

Data collection Form Edit
We have a form which will be used almost daily, for data collection, based on a query. During the test we found a typo in one of the field labels where a brief description is included. Is there some way to edit the form? (recreating it with all the custom lables is just too long a task). Another issue on this topic, every time the form is sent, the messge reverts to the default "Please fill out the form and retunr it to me". Can this default message be changed? Nothing in the help functions. Any advice, or deirection to a learning resource will be appreciated. Thanks is adva...

Static and query based dist groups
Hello, I'm implementing a QBDG (query based distribution group) in exchange 2003 to contain all full time employees and another to include all part time employees. I've got the LDAP search down and it works perfectly. The problem is that my bosses want to be able to opt in to the particular lists. I need to be able to create a static DG that contains the opt ins as well as the QBDG. How do you add a QBDG into a static DG? "adam432823" <adam432823@discussions.microsoft.com> wrote: >Hello, I'm implementing a QBDG (query based distribution group) in excha...

Setting caret in edit control & activating it.
Hello Does anyone have any example code for setting and enabling the caret in an edit control ? Nicholas Take a look at the CEdit::SetSel() member function. -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message news:3f9d418a$0$106$65c69314@mercury.nildram.net... > Hello > > Does anyone have any example code for setting and enabling the caret in an > edit control ? > > Nicholas > > If you are asking how to create & use your own caret in an edit control then check...

"Windows PowerShell Cookbook" by Lee Holmes second edition draft available for viewing and comments
O'Reilly Books has made the working text of the PS V2 second edition of Lee Holmes' "Windows PowerShell Cookbook" available for viewing and comments at http://powershell.labs.oreilly.com/ - Larry In message <exi7SKRyKHA.2552@TK2MSFTNGP04.phx.gbl>, Larry__Weiss <lfw@airmail.net> writes >O'Reilly Books has made the working text of the PS V2 second edition >of Lee Holmes' "Windows PowerShell Cookbook" available for viewing and >comments at > > http://powershell.labs.oreilly.com/ > > - Larry > Aw...

Having Insert button functionality while editing
Hi, I want to have the functionality of Insert button (on keyboard) in my while application while editing in a cell or a edit box. For eg if i am editing my text say "alpha" and my cursor is between "l" and "p" and I insert an alphabet say "z", i want the "p" should be replaced by "Z" and the text should become "alzha". Please suggest. Thanks in advance. Regards, Arjun CEdit does not support that by default. Here is a good example of how implement this (Although I think UpdateCaret should just be a method of CXEdi...

Form, Query, and Updating Records
I have an employee profile form that I would like to filter by what location the employee works out of. The location is already determined based on a login I have in the beginning. The location value is stored in a Query (call it query1). When I get the records filtered to what I want, I still want to be able to edit/update them. Is this possible? I have played around with the Adavanced Filter but haven't been successful because when I filter the correct field in the employee profile form, and put my EXPRESSION (I think this is part of the problem) of what I want it filted by ([Query1]...

need example code to get the contactID from SFA/conts/edit.aspx...
Hi!! My question is: How can I get the right ContactID from the current/opened Contact in Microsoft CRM? Can I read the ContactID out from the URL? Is there an example Code available? Microsoft�s SDK for CRM is not very helpful for this Problem. Has anybody already an example code? Thank you for your help! Greetings Daniel You should be able to get it from the query string, as long as you make sure that the entry in the isv.config file with the link to your app has the variable "PassParams" equal to 1 For example: <Button Title="Test" ToolTip="Info on Test&qu...

Edit No Format
I have a spreadsheet that Has a column of No's that look like this AB 12 45 87 B the column has about 30,000 No 's in it. I want the No's to look like AB124587B so that they do not have the spaces in, any way of doing this un excel. If it's always the same format you can do it by using a combination of the left(),mid(), and right() functions.. Then use the & sign to fix it.... example : a1: ab 12 a2: left(a1,2) & right(a1,2) a2 then says: ab12 there might be a function that just removes all spaces though... trim() only works for opening and ending spaces. --- M...

How do I find where I stopped editing a document?
In Word 2003, I could use Shift F5 when I opened a document to find where I left off editing it the last time I opened it. This doesn't seem to work in Word 2007, at least not consistently. Is there some other menu item or keyboard shortcut I can use, or are there some circumstances under which Shift F5 will work? Unfortunately, it doesn't work in XML (*.docx) documents, only those saved in Word 97-2003 format. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Shortcut Jane" <Shortcut Jane@discus...

Riche Edit
hi I think this is a simple question for you guys: When I try to add a RichEdit field in the resource view my programm compiles fine but it won't start anymore. When I debug it with F5 it crashes with an exeption!?! I use Win2k and Visual Studio 6 + SP5. My Project is MFC Dialog based. This should work shouldn't it? Thanks Urban "Urban Stadler" <mail@ustadler.net> wrote in message news:3f47ad41$0$19888$91cee783@newsreader01.highway.telekom.at... > hi > > I think this is a simple question for you guys: > > When I try to add a RichEdit field in the r...

Standard Edition versus Edition 2004
I have Microsoft My Money Standard Edition installed on my PC (WinXP). It came as a part of Ms Works suite 2006. Now I would like to restore the backup file to My Money 2004 editions. But there seems to be a problem, My Money 2004 does not accept the backup files of the Standard Edition. Is the anything I can do in order to make the transfer of the backup file possible? Grateful for your help QV The version of Money in Works 2006 was likely newer than Money 2004. You will need to use a version of Money at least as recent as that which was used to make the backup. "QV" <q...

Change edit Item box
Quick Question, In SharePoint I am trying to change which the edit item box associates with. (Example in my list I have the following Categories Name, Modified Date, Modified by, Document Type, etc...) Currently when I move my mouse over the Name Column, I see the drop down box saying, Check effective permissions Edit Properties Edit in Microsoft Word etc.. How can I change that so when I move the mouse over the Modified By Column that I'll see the same drop down box? You don't, sorry. "Thames" <Bob@bob.bob> wrote in message news:74566AB2...

Query
How could I force the query results to output to a specific format/template? The reason for this is that certain values don't exist in certain date ranges within the data pool. I need those values to be included in the query results anyway. I have tried linking another query(tried a table also) with the template to the query that calculated the results. Is there something I should consider when doing this? A better way? Thank you Erik Create a new query that includes the table that contains the domain of values you want to appear in the output and join that table to the existin...

Date based query problem
I have an inventory database (in Access 2007) that calculates the Beginning Inventory, # Cards Sold, # Cards Purchased, and Ending Inventory. I have a query that pulls the # Cards Sold, # Cards Purchased, and calculates the Ending Inventory based on the date parameters given to the report ("Enter Beginning Date" and "Enter Ending Date"), but I need to pull the Beginning Inventory information based on all data prior to the "Beginning Date" of the report. For instance... the date parameters are 5/1/07 (Beginning Date) and 5/31/07 (Ending Date), so the Beginn...