From: RA on 29 Mar 2010 17:48 SELECT Residents.[Last Name], Reciepts.Date, Reciepts.[Street Number], Reciepts.[Street Name], Reciepts.Amount FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street Name]); I have a couple of combo boxes in my form that uses information from this query to populate a table. The query allows me to type in the last name in a box on my form, and then fill in the street number and street name using the drop down box. My issue is that once I fill in the form once, and go to the next line, the query still pulls the information from the first time. How do you get it to recheck for each record without leaving the form and coming back?
From: Larry Linson on 29 Mar 2010 23:04 I do not see where the query refers to a field on the form, nor mention of how "the drop down box" works off the query (that is, what its Row Source is). We don't have enough information to be of much (or any) help. Larry Linson Microsoft Office Access MVP "RA" <RA(a)discussions.microsoft.com> wrote in message news:99025EEC-FF50-43DB-BF3B-708B25FD3711(a)microsoft.com... > SELECT Residents.[Last Name], Reciepts.Date, Reciepts.[Street Number], > Reciepts.[Street Name], Reciepts.Amount > FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = > Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street > Name]); > > > I have a couple of combo boxes in my form that uses information from this > query to populate a table. The query allows me to type in the last name > in a > box on my form, and then fill in the street number and street name using > the > drop down box. My issue is that once I fill in the form once, and go to > the > next line, the query still pulls the information from the first time. How > do > you get it to recheck for each record without leaving the form and coming > back?
From: RA on 30 Mar 2010 08:14 sorry, wrong query: SELECT Residents.[Street Number] FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street Name]) WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); & SELECT Residents.[Street Name] FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street Name]) WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); Row Source: one refers to one of these queries, the other to the second one. I do have a requery maco identified in the "on Enter" property line. "Larry Linson" wrote: > I do not see where the query refers to a field on the form, nor mention of > how "the drop down box" works off the query (that is, what its Row Source > is). We don't have enough information to be of much (or any) help. > > Larry Linson > Microsoft Office Access MVP > > "RA" <RA(a)discussions.microsoft.com> wrote in message > news:99025EEC-FF50-43DB-BF3B-708B25FD3711(a)microsoft.com... > > SELECT Residents.[Last Name], Reciepts.Date, Reciepts.[Street Number], > > Reciepts.[Street Name], Reciepts.Amount > > FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = > > Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street > > Name]); > > > > > > I have a couple of combo boxes in my form that uses information from this > > query to populate a table. The query allows me to type in the last name > > in a > > box on my form, and then fill in the street number and street name using > > the > > drop down box. My issue is that once I fill in the form once, and go to > > the > > next line, the query still pulls the information from the first time. How > > do > > you get it to recheck for each record without leaving the form and coming > > back? > > > > . >
From: RA on 30 Mar 2010 09:40 I've also tried this in the After Update- no luck: Private Sub Street_Name_AfterUpdate() Forms![Reciepts]![Street Name].Requery End Sub Private Sub Street_Number_AfterUpdate() Forms![Reciepts]![Street Number].Requery End Sub "RA" wrote: > sorry, wrong query: > > SELECT Residents.[Street Number] > FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = > Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street > Name]) > WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); > > & > > SELECT Residents.[Street Name] > FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = > Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street > Name]) > WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); > > Row Source: one refers to one of these queries, the other to the second one. > I do have a requery maco identified in the "on Enter" property line. > > > "Larry Linson" wrote: > > > I do not see where the query refers to a field on the form, nor mention of > > how "the drop down box" works off the query (that is, what its Row Source > > is). We don't have enough information to be of much (or any) help. > > > > Larry Linson > > Microsoft Office Access MVP > > > > "RA" <RA(a)discussions.microsoft.com> wrote in message > > news:99025EEC-FF50-43DB-BF3B-708B25FD3711(a)microsoft.com... > > > SELECT Residents.[Last Name], Reciepts.Date, Reciepts.[Street Number], > > > Reciepts.[Street Name], Reciepts.Amount > > > FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = > > > Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street > > > Name]); > > > > > > > > > I have a couple of combo boxes in my form that uses information from this > > > query to populate a table. The query allows me to type in the last name > > > in a > > > box on my form, and then fill in the street number and street name using > > > the > > > drop down box. My issue is that once I fill in the form once, and go to > > > the > > > next line, the query still pulls the information from the first time. How > > > do > > > you get it to recheck for each record without leaving the form and coming > > > back? > > > > > > > > . > >
From: BruceM via AccessMonster.com on 1 Apr 2010 10:00 It would help to know something about the database's structure, and the real- world situation. If each resident may have several receipts there should be a Residents table and a related Receipts table. Unless you need to store historic address information (which may happen with a shipping address, where you want to see where a specific order was sent regardless of the current address), the address information should exist only in the Residents table, and should not be copied to the receipts table. In terms of interface there would be a main form based on the Residents table, with a subform based on the receipts table. This is guesswork, as there is not a lot to go on. RA wrote: >sorry, wrong query: > >SELECT Residents.[Street Number] >FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = >Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street >Name]) >WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); > >& > >SELECT Residents.[Street Name] >FROM Reciepts INNER JOIN Residents ON (Reciepts.[Street Number] = >Residents.[Street Number]) AND (Reciepts.[Street Name] = Residents.[Street >Name]) >WHERE (((Residents.[Last Name])=[Forms]![Reciepts]![Last Name])); > >Row Source: one refers to one of these queries, the other to the second one. > I do have a requery maco identified in the "on Enter" property line. > >> I do not see where the query refers to a field on the form, nor mention of >> how "the drop down box" works off the query (that is, what its Row Source >[quoted text clipped - 22 lines] >> >> . -- Message posted via http://www.accessmonster.com
|
Next
|
Last
Pages: 1 2 Prev: Help parsing HTML into text in my text box within my form Next: Change Currency Using a Form |