473,770 Members | 4,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query fields will not update after intial Entry

Curben
47 New Member
Hello all, two days of websearching and I cannot find an answer yet.

Reasonably new to access development.

Access 2000 DB using access 2003 on windows XP

I am having an issue with creating a query that I can enter the Part ID as value and hvae the description, cost etc. populate in the rest of the query.

I have two Tables; ItemMaster and [Initial Input]
[Initial Input] has one Value: [Part ID]
and ItemMaster has several but i have limited to Segment1, Description, Item_Cost

I want to create a form based on a query that when the Part ID is entered that the query runs and displays the rest of the information. This will later be appended to a table which will be followed up on by another user.

The problem I have is that the query will not update unless saved, closed and reopened, or switch views. So instead of Entering in the one value and the rest of the values filling in automatically, enter just goes to the next blank value.

I have done this several time before and they have all worked. One item that may make a difference is i just transfered to a new PC and attempted to change all the options so perhaps i checked/unchecked something i shouldnt have.

Any help or assistance can be appreciated

Thanks

Expand|Select|Wrap|Line Numbers
  1. SELECT [Initial Input].[Part ID], ItemMaster.DESCRIPTION, ItemMaster.ITEM_COST
  2. FROM ItemMaster RIGHT JOIN [Initial Input] ON ItemMaster.SEGMENT1 = [Initial Input].[Part ID];
  3.  
Oct 17 '07
35 9978
Curben
47 New Member
Ok, I think I see where the confusion is. You really want a parameter query...where you can enter a value and have the rest of the info returned. Let's do this:

1. Place your query in design view
2. In the criteria row of the first field in your query grid, type the following:
[Enter a value]
3. save your query and run it
4. Tell me if that is what you meant.
No, not at all

I want to know why this query wont run in real time, like all the others i have written would

I open the query as datasheet, field one relates to one table, the rest of the fields relate to another table, they are joined by one PartID number to display all from table one, and matching from table 2, so when i enter a value for field 1 on the query, the query returns the values from table 2 that has the corresponding partID. In the past, the query has returned the values as i went to the next record of the query, now the record remains blank for all other values until i close the query and reopen it
Oct 18 '07 #11
puppydogbuddy
1,923 Recognized Expert Top Contributor
No, not at all

I want to know why this query wont run in real time, like all the others i have written would

I open the query as datasheet, field one relates to one table, the rest of the fields relate to another table, they are joined by one PartID number to display all from table one, and matching from table 2, so when i enter a value for field 1 on the query, the query returns the values from table 2 that has the corresponding partID. In the past, the query has returned the values as i went to the next record of the query, now the record remains blank for all other values until i close the query and reopen it
Listen, your said before that your query runs fine when you first open it, which I assumed you meant that it displays all your PartID's and related information from the two tables in accordance with your query definition. You then said it is only when you enter a value in field1, that all other columns go blank.

First of all, if field1 is the primary key field, you can not change (update) its value,,,, period. Secondly, if field1 is not a primary key field, and you change its value in any row,the remaining columns related to that row remain unchanged, but they don't disappear. That is the way an updateable select query works,

Now if what you are wanting to do is select a specific partID from the query and see information related to that specific PartID, then the easiest way to do it is to specify a query parameter in the criteria row in the query grid for PartID that will prompt you to enter a specific partID and if it exists, will return all remaining columns related to that specific part ID.

Your parameter in the criteria row of the PartID field would look like this>>> [Enter a PartID]
Oct 18 '07 #12
Curben
47 New Member
Listen, your said before that your query runs fine when you first open it, which I assumed you meant that it displays all your PartID's and related information from the two tables in accordance with your query definition. You then said it is only when you enter a value in field1, that all other columns go blank.

First of all, if field1 is the primary key field, you can not change (update) its value,,,, period. Secondly, if field1 is not a primary key field, and you change its value in any row,the remaining columns related to that row remain unchanged, but they don't disappear. That is the way an updateable select query works,

Now if what you are wanting to do is select a specific partID from the query and see information related to that specific PartID, then the easiest way to do it is to specify a query parameter in the criteria row in the query grid for PartID that will prompt you to enter a specific partID and if it exists, will return all remaining columns related to that specific part ID.

Your parameter in the criteria row of the PartID field would look like this>>> [Enter a PartID]
I am not trying to change it, I am trying to add to it, and this works in multiple databases that i have built already, and in the databases used by a dozen other people i work with.
Table one is blank and exists for the sole purpose of recording the PartIDs that are being queried, By entering the PartIDs as new records on the query, they are added as records on the Table and will then allow me to look up what parts the users have looked at and reviewed.
By adding in the Criteria, all that creates is a popup box to add a single value, and seems unnessecary after having it work in other queries. esspeciially as i will end up needing multiple new records each time

If the query will not run live, then the form will not work as this is what i discovered when my first attempt at a form was not working and the textboxes on the form where not filling with the data either.
Oct 18 '07 #13
puppydogbuddy
1,923 Recognized Expert Top Contributor
I am not trying to change it, I am trying to add to it, and this works in multiple databases that i have built already, and in the databases used by a dozen other people i work with.
Table one is blank and exists for the sole purpose of recording the PartIDs that are being queried, By entering the PartIDs as new records on the query, they are added as records on the Table and will then allow me to look up what parts the users have looked at and reviewed.
By adding in the Criteria, all that creates is a popup box to add a single value, and seems unnessecary after having it work in other queries. esspeciially as i will end up needing multiple new records each time

If the query will not run live, then the form will not work as this is what i discovered when my first attempt at a form was not working and the textboxes on the form where not filling with the data either.
Ok, if you are trying to add a new record, that is different. Generally, a form with the allow additions property set to yes and bound to the query is used to add new records. Adding new records via the query itself requires what is known as an "append query", which is generally used to append a batch of records at the same time.

So, once you create your form, set its allow additions and allow edits property to yes and make the form bound (the form' recordsource references the query) to the query, you will be able to add or edit records the way you want.
Oct 18 '07 #14
Curben
47 New Member
Ok, if you are trying to add a new record, that is different. Generally, a form with the allow additions property set to yes and bound to the query is used to add new records. Adding new records via the query itself requires what is known as an "append query", which is generally used to append a batch of records at the same time.

So, once you create your form, set its allow additions and allow edits property to yes and make the form bound (the form' recordsource references the query) to the query, you will be able to add or edit records the way you want.
Several access tutorials, my own limited access experience, and the experience of several coworkers all say differently, because that method doesnt allow the use of the query as a lookup as well. And it should be useable from the datasheet view of the query as well, which i and others use in multiple scenarios. The query should lookup up , in real time; the data from the second table. Its not, why?
Oct 19 '07 #15
MMcCarthy
14,534 Recognized Expert Moderator MVP
OK firstly to sort out the confusion here.

My understanding of the situation is that if you add a new record to the query the foreign key of the join table doesn't populate so the record in the second table doesn't get added.

Assumption is that both tables have a one to one relationship.

I think I know what the problem is just give me a few minutes to check it.
Oct 19 '07 #16
FishVal
2,653 Recognized Expert Specialist
Hi, Curben.

I've read the whole thread and didn't figured out clearly what you actually mean.
Though it may be as simple as the following.
  • ItemMaster.SEGM ENT1 is primary key
    [Initial Input].[Part ID] is foreign key
  • the query you've posted
    Expand|Select|Wrap|Line Numbers
    1. SELECT [Initial Input].[Part ID], ItemMaster.DESCRIPTION, ItemMaster.ITEM_COST
    2. FROM ItemMaster RIGHT JOIN [Initial Input] ON ItemMaster.SEGMENT1 = [Initial Input].[Part ID];
    3.  
    is RecordSource of your form
  • You want to input data to control bound to [Initial Input].[Part ID] and want other controls bound to [ItemMaster] table fields to be automatically populated with the values of record where ItemMaster.SEGM ENT1 = what you've entered.
Am I right?
Oct 19 '07 #17
MMcCarthy
14,534 Recognized Expert Moderator MVP
OK firstly to sort out the confusion here.

My understanding of the situation is that if you add a new record to the query the foreign key of the join table doesn't populate so the record in the second table doesn't get added.

Assumption is that both tables have a one to one relationship.

I think I know what the problem is just give me a few minutes to check it.
OK I just went back and looked at your initial query. You have a right join and this is your problem. Your right join is saying give me everything from [Initial Input] table but only those records from ItemMaster table that match. This will not occur until after the record is saved. You can really only add records to a query where there is one and one matching record per table in the query. This is known as a one to one relationship. Normally you can only build a form on this type of query.

In all other circumstances you will need to use Subforms to populate all but the main table.
Oct 19 '07 #18
NeoPa
32,573 Recognized Expert Moderator MVP
I can't help feeling you guys have got into some miscommunicatio n somewhere (talking at cross-purposes).
I know it's very easily done as I have managed to get myself into that scenario a couple of times myself on here. It's mainly because of the medium involved and the need for absolute precision and accuracy while communicating when most of the clues we normally rely on (visual etc) are absent.

Let me see if I can't have another look through the thread when I get some time and see if I can pick up on anything that might help. I may well need to ask some further questions of the OP (Curben), so please, if I do, be patient with me. I'm very precise and picky, and that seems to irritate some people, but I find it is helpful when dealing with technical things that are easily misunderstood.

In the mean-time, could I ask you to post the meta-data of the two tables you're using. Relevant fields only required. All linking fields (to the other table particularly) are relevant of course. Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; Autonumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
**Edit**
Forget this - I was preparing this while others nipped in and posted. Mary's solution may be all you need. Let us know how you get on.
Oct 19 '07 #19
Curben
47 New Member
Hi, Curben.

I've read the whole thread and didn't figured out clearly what you actually mean.
Though it may be as simple as the following.
  • ItemMaster.SEGM ENT1 is primary key
    [Initial Input].[Part ID] is foreign key
  • the query you've posted
    Expand|Select|Wrap|Line Numbers
    1. SELECT [Initial Input].[Part ID], ItemMaster.DESCRIPTION, ItemMaster.ITEM_COST
    2. FROM ItemMaster RIGHT JOIN [Initial Input] ON ItemMaster.SEGMENT1 = [Initial Input].[Part ID];
    3.  
    is RecordSource of your form
  • You want to input data to control bound to [Initial Input].[Part ID] and want other controls bound to [ItemMaster] table fields to be automatically populated with the values of record where ItemMaster.SEGM ENT1 = what you've entered.
Am I right?
This Sounds about exactly what I am looking for.
Oct 19 '07 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2935
by: lawrence | last post by:
A very strange bug. www.monkeyclaus.org is run by a cms I'm developing. One of types of users we allow is "justTestingTheSite", a type of user I developed to give demo's to prospective clients. The purpose of this level of security is to let someone log in and see everything as if they were root, and yet not be able to update or delete anything, as they have no real priveledges at all. I just logged in as root and created such an...
3
1772
by: JC Mugs | last post by:
Help needed for project-Access 2002(office xp) PROBLEM: Figuring out how to lookup a record and DDate field in Table1 - Take that DDate-field data from record looked up and assign it to Date field in a new record on a form using Table2. BASIC Table1 Fields: DID -Primary KEY DDate --Information I need to move to new form
7
1788
by: Patrick Fisher | last post by:
Hi I have a table which Contains entries with RefCode field containing INVP or INVPD Common fields in each entry would be InvoiceNo, Total and PurTyp for example. You could have 1001 500.50 INVP 1 1001 500.50 INVPID 1 1002 123.00 INVP 1
1
359
by: Jon | last post by:
Hi there. I'm trying to create a query (or two) that I can use to produce a spreadsheet but I'm having a bit of trouble. I'm using Access 2000. My db is set up like this: Table1: Intrusive Manhole Survey Fields: IntrusiveEntryID (PK), ManholeID, Date, Sewer System, Firm, Inspector, Benching Description, Manhole Type, Manhole Diameter, Sump Elevation, Source, Notes.
5
3510
by: Irfan | last post by:
Hi All, I am trying to create a report but having problem with the critiera selection logic, please help. I have the following fields date1 date2 date3
4
1593
by: johnny | last post by:
hi all, I hope it is easier for you to answer than for me trying to explain it... In a database I have some tables , each one has some mandatory fields at the beginning and a couple at the end. In the middle each table can have some additional fields from 0 to n depending on how many fields have been inserted by who created the table.
0
3303
by: phlype.johnson | last post by:
I'm struggling to find the best query from performance point of view and readability for a normalized DB design. To illustrate better my question on whether normalized designs lead to more complex queries yes or no, I have prepared an example. The example is a database with the following tables: *table person with fields: -persid: autoincrement id -name: name of the person *table material with fields: -materialid: autoincrement id
9
3062
by: Kelii | last post by:
I've been trying to get this piece to work for a few hours, but have given up. I hope someone out there can help, I think the issue is relatively straightforward, but being a novice, I'm stumped. Below you will find the code I've written and the error that results. I'm hoping that someone can give me some direction as to what syntax or parameter is missing from the code that is expected by VBA. Overview: I'm trying to copy calculated...
7
1322
by: KC-Mass | last post by:
I have two tables related to sales transactions and assigned areas. The tblSalesArea has SalesAreaID an autonumber StartZip, Text EndZip, Text The tblSales has many fields detailing all the sales. The two fields of concern are ZipCode, Text and SalesAreaID a number.
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.