Query Not Picking Up Current Record
Hello,
Can anybody see what I'm doing wrong here. I have the following query
SELECT Contacts.Cust_FK, Contacts.ContactNr, Contacts.FirstLastName
FROM Contacts
WHERE (Forms.ComLogDetail.Cust_FK=Contacts.Cust_FK)
ORDER BY Contacts.ContactNr;
The "Forms.ComLogDetail.Cust_FK" part should render the current record in the form ComLogDetail but its not. Any ideas?? I'm an amateur programmer so my apolgies if the solution is all too simple.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Refer To Previous Record In Current Record Query
In my query, i want to automatically display the value of another field from the previous record in a field in my current record. i.e. Name Value Previous Record 1 1 Record 2 2 1 Record 3 7 2 Record 4 1 7 Is it possible to create some kind of simple expression to refer to data in another record? Cheers, Ben
View Replies !
View Related
Query Not Picking Up The <> Operator
I have two tables in the first table there is an outline number and the second table there is a task id (both are text strings, i.e. outline number and task id would be something like 8.15.3.1) I want a query to return all the results in the first table that are not equal to the second table I have tried the following but it returns all 54 records Code:SELECT DISTINCT RawData.TeamLeadNumber, RawData.Category, RawData.OutlineNumber, RawData.OutlineDescription, RawData.Start, RawData.Finish, RawData.Milestone, RawData.PercentComplete, RawData.DeliverableDesc, RawData.ReleasePeriod, RawData.OutlineNumber2, RawData.OutlineDescription2FROM RawData, SharePointDataWHERE (((RawData.OutlineNumber)<>SharePointData.TaskID)); I have tried changing the where clause to have it as Code:WHERE ((RawData.OutlineNumber)<SharePointData.TaskID) AND ((RawData.OutlineNumber)>SharePointData.TaskID); but then no data is returned, and I know that of the 54 records 21 of them are the same so I should be seeing 33 records
View Replies !
View Related
How To Set Query On The Current Record
hi all, i create a form which have a button to append the current entry to another table but i only want to append the current entry tat is open. So how do u set the query to append one entry(the current open entry on the form) using the criteria. i notice the query only have sum, aver, +- ...etc.. tks.
View Replies !
View Related
Query Only Picking Up 1 Didgit From Table
Hi I'm a bit new to SQL, and have what is probably a rather simple question: I have a query, which i want to pick up a figure from a table. SELECT * FROM Feb_Closed WHERE Time_to_Close>'6' AND Team_Owner='Comp& Ben'; This give me a load of rows with Time to close between 6 and 9 but nothing else. The problem it is not counting everything over 9 ie i think that it is just looking at 1 digit in the table and so ignoring 10, 11, 12, 13... etc etc. Any help gratefully received. Thanks
View Replies !
View Related
Append Query Using The Current Record
I have a form with a subform in Datasheet view. I want the user to double click a record in that subform and a query to ammend it to another table. I want to trap the double click event of the subform but how do i run a query based on a current record in a subform?
View Replies !
View Related
Refering To The Current Record In A Query
It is possible to refer in a SQL statement to the "current" or "actual" record?I want to base the querry in the present value of two related tables. I will try to show you what I have to do, maybe you can give an alternative solution.These are the tables:tblTeam (idTeam, TeamName, DayCreated)tblTeamPerson (idPerson, idTeam)tblPerson (idPerson, PersonName, MusicPreference)Every person have a music preference, and the teams have to be formed by people with similar music preference.So, one way to filter that is to use the following method: everytime I create a team, I choose a person, ok. That firts guy is the one that will give the team his "MusicalPreference". The next members with different MusicalPreferences will be excluded from the query.But in order to do that, I need to refer to the current team that have 1 member, and use the value of the field MusicPreference in that Person in particular.I hope you have understand what I have to do, and I hope you can help me with this.P.S.: I´m using a combo-box with a special query in a subform to select the team members. In the main form I create the team. So it would be great to be able to use that "idTeam" value in relation with the firts team member of that team.
View Replies !
View Related
Query Based On Current Record
I am designing a contact management system and have hit a bit of a wall. I am farily new to Access so please advise if I am going about this the totally wrong way. I have three tables; Contacts, Companies, Company_Addresses Contacts: ContactID (P) CompanyID OfficeName Companies: CompanyID (P) Company_Addresses: CompanyID OfficeName (P) What I want is when adding a contact, to have a drop down list in the CompanyID field showing all the companies in the Companies table, and then in the OfficeName field, have a list of only the offices related to the company selected in the previous field. I can do the first list, but cant work out how to list only data related to the company selected in the previous field. Any help would be greatly appreciated. Sorry if this is in the wrong forum. Thanks. James
View Replies !
View Related
Append Query To Current Record Only
This is my first time posting to a forum so don't hesitate to correct me if I am doing something wrong. I am trying to create autofill templates based on the worktype. How do I append data to the current record only! I have a table that contains all of the job information including a record autonumber. I have made a form using this table and it includes a subform for charge items from a separate table. My users are complaining about having to key in every line item and want the form to autofill the subform for charge items based on the worktype field. I have written an append query which is correctly extracting the worktype field and updating the charge items fields but it is doing so for every record with the same work type. I just want it to update the current record I am looking at.
View Replies !
View Related
Query Based On Current Record Selection
right, struggling here. Basically I have continuous form listing all the standard letters sent out when I double click on a letter, I need to to run a query for me. The code I have put behind the button is: If ([StandardLetterType] = "Homework") Then DoCmd.OpenQuery ("qryHomeworkClearMailMerge") DoCmd.OpenQuery ("MergeHomework"), , , , , acDialog, Me.[StandardLetterID] DoCmd.OpenReport ("rptHomework"), acViewPreview Else ' end if and in the query I am first clearing the mailmerge yes/no field out which works fine and then running the merge to put the yes back in the current record so the query looks like this Its an update query with update to yes for mailmerge and under the standard letter ID i have the criteria [Me].[OpenArgs] is this completely wrong tried the [Forms!][frmFullStudentReport].[standardletterID] but it kept popping the box up asking for the number. On the form I have the standardletterID and its hidden but there. Any help would be greatly appreciated
View Replies !
View Related
Dynamically Update Field Of A Current Record Based On Previous Record
I need a way to dynamically store a particular value in "field_2" of the CURRENT record depending on whether or not the value of "field_1" of the CURRENT record is identical to the value of "field_1" of the PREVIOUS record within the same table. The table is sorted on "field_1". So, if the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is also "ABC", then store a value of "PPP" in "field_2" of the current record. IF on the other hand, the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is "XYZ", then store a value of "WWW" in "field_2" of the current record. I have a report that will use these results to count only the number of records that have a "WWW" in "field_2". Is this doable, maybe in a query somehow? I should add that whatever the solution, it needs to be compatible with Access 2000.
View Replies !
View Related
Can I Use Combo Box List Out My Record With Going To The Current Record ??
Hi all, Another problem bothering me. Wish someone can help me to solve it. I am doing the 'Edit' Option right now ... As a user friendly propuse, I had try to use a combo box to let user to choose my employee record with all the detail on but the problem is the program 'JUST' list the record they can not go to the current record!! When i try to edit my record, the program is not allow (for sure because they can't have a duplicate record on it). The reason is because the record just stay in the FIRST record but can not go to the current record. I do believe is the problem of i using the way of listing the record as below: Me.EmployeeName = Me.EmployeeName.Column(0) Me.IC = Me.EmployeeName.Column(1) Me.Nationality = Me.EmployeeName.Column(2) Me.Race = Me.EmployeeName.Column(3) Me.Sex = Me.EmployeeName.Column(4) Me.FMU = Me.EmployeeName.Column(5) Me.Position = Me.EmployeeName.Column(6) Me.SectionField = Me.EmployeeName.Column(7) Me.DOEmploment = Me.EmployeeName.Column(8) Me.DOResign = Me.EmployeeName.Column(9) Me.Remarks = Me.EmployeeName.Column(10) So, Could someone help me to solve it like when i can use the combo box to select the Employee record with the details are on as the same time can go to current record... Thanks alot!!! i do have the confident if i can go to the current record then my edit option can be working properly. P/S: I had attach the picture... showing my program problem (with the red circle)
View Replies !
View Related
Need Form For New Record/edit Current Record
I have a table called tblFinishedGoods. There are 3 fields in the table:Serial Number, Model Number and Location. I would like to have a form that will take input from my barcode reader and input the data for the 3 fields, if the serial number is not already in the table.(I have this already working). But now I would like the same form to also check the table for any serial number that is scanned in...and if it is in the table already, have it bring up the model number and location for that record. I'm thinking maybe there is something I can do with Serial Number afterupdate. Basically I'm looking for a way to not require the user to input anything via a mouse or keyboard. If the 1 form could accept the 3 scans:Serial Number,Model Number and Location, and either 1)enter a new record if that serial number isnt in the table or 2)find that the serial number already exists and overwrite the model number and location with whatever the next 2 scans are. Thanks
View Replies !
View Related
Faxing Current Record Or Record Set
hello, I have faxing setup through the XP wizard, I setup my report in Access to use the Fax as specific printer. So When I select a record, it generates the Fax wizard which then prompts for the senders name Fax # etc. and away it goes. that is ok but It would be nice if I could use the Fax number from the record I am sending, either current record or all. I guess the main trick is how would I pass the fax number to the Fax Printer interface? Is it possible? I've read a few articles on Microsoft Fax for workgroups to work with Outlook, Outlook help says to go to Office update and download it but I can't find it there? Also do the newer versions of Outlook/Access have a better means of doing this? I am running office 2000, but I can get 2002 installed if that is the case. thanks Ziggy
View Replies !
View Related
Not Picking Up Table Value
Hi everybody, I have the following table: ID ThicknessFieldRange1 ThicknessFieldRange2 Factor 16 0.0641 0.068 0.97 17 0.0681 0.072 0.98 18 0.0721 0.076 0.99 Now, I have a form that has a 'Thicknesstxtfield' that when calculated in the form its value is 0.072 in this case . Based on the range this value falls into, I want to get the correspondant 'Factor' which in this case would be '0.98'. Guess what, ACCESS is telling me that it cannot find the value '0.072' in the table and gives me an error. Any ideas on this? Notice that all the fields except "ID" are 'Doubles' with 4 decimal places, and I find the values using the 'DLookUp' function. I know that's where the error is because all the other ranges work fine. Thanks everyone
View Replies !
View Related
Picking From Combo Box - I'm New .. Help Please
I need help, please. I have a database to track dance studio students and their tuitions/payments. One of my tables is a list of the classes and their corresponding tuition costs and costume costs (3 fields, 8 records). I have a studentclass table that contains the student's ID and class information. I made a form that shows the student's first and last name. Then I made a subform to show the list of classes the student has taken. What I also want is some way that when I click a class name, the corresponding tuition will be put in a "tuition" field on the student class subform. But, since there may be a student who gets a discounted tuition, I need the tuition amount stored in a field on the studentclass table - or somewhere. I have read and studied information about cascading combo boxes and synchronizing combo boxes but I just can't get it to work. I'm at my wits end. I've posted a pic of the form in the hopes that one of you will take a look and tell me where I'm going wrong. I want to add fields on the class list to show the tuition and costume charge.
View Replies !
View Related
No Current Record
I have a query that pulls all orders out of 3 tables that fit specific criteria. tblLotInfo.WOSD = Between ([tblLotInfo].[WOSD])<=Date() And [Forms]![frmRaisedPanelLots].[EndingDate] tblDelivery.Status = <>"On Floor" And <>"Floor Hold" And <>"On Floor LV Losee" And <>"On Floor LV N. 5th" And <>"On Floor ONT Cucamonga" And <>"On Floor ONT Locust" And <>"Shipped" And <>"Installed" And <>"Invoiced" And <>"Completed" And <>"Cancelled" And <>"Returned to Floor LV Losee" And <>"RETURNED TO FLOOR N. 5th" And <>"Returned to Floor ONT Cucamonga" And <>"Returned to Floor ONT Locust" tblLotInfo.DoorStyle = Like "*eagle*" Or Like "*H/E*" Or Like "*RP*" Or Like "*F/E*" Or Like "*CC-23R*" Or Like "*AR-756*" Or Like "*Deco*" This query works fine through 12/29/05. Anything date entered after that gives me "NO CURRENT RECORD". I don't know why. We have orders through Feb of next year scheduled. Any help would be greatly appreciated!!
View Replies !
View Related
Sum Until Current Record
I have a form in continuous forms mode and fields with amounts. I want to have a field belonging to the Detail, where will be presented the sum of all above recs until current one. E.g. Name MyValues Sum fwe 10 10 gfgerg 2 12 gegrere 4 16 and so on. Any suggestions would be very helpful
View Replies !
View Related
Help With Get Current Record On Different Ids...
I need help to get current record with different ids: Dim strDocName As String Dim strWhere As String strDocName = "16kanaler" strWhere = "[skjema_16_gr1_ID]=" & Me!skjema_16_gr1_ID DoCmd.OpenReport strDocName, acViewPreview, , strWhere How can I use more Ids in the wherecondition? I want to get the current record for skjema_16_gr1_ID and skjema_16_gr2_ID, not only the first. Please help me... Håvar
View Replies !
View Related
Picking Orders For Invoices
Hi everyone, I'm sort of new to Access, but over the past few months I've been able to develop an inventory database for my work which turned out quite nicely and does everything I need it to, except for one thing. I want to also create invoices for my customers, and after looking at examples I understand that most people link the "order" with the invoice, so that there is one invoice per order. However, I need the ability to combine many orders into one invoice. That's where I'm stuck. I don't know how to arrange my relationships and forms so that I can "pick" the orders I want on my invoice, and not at the time of the Order, but at some point after. Basically my orders will be established, but their allocation to invoices won't, until I come along and put them into their rightful bill. Does anyone have any thoughts on this? I'm pretty stumped. Thanks a lot for your help.
View Replies !
View Related
Picking Biggest Default
I have a table with ID1, ID2, and AMT. IF ID2 is NULL, I want to update it with the non-null ID2 where the ID1 matches and has the largest sum of AMT. For instance ID1 ID2 SUM(AMT) 1 333 1000 1 444 3000 1 <null> 5000 In this case, the third ID2 would get the value of 444 since it had the highest amt. I'm guessing this involves sub-queries, and I have a real blind spot where they are concerned. Thanks, David
View Replies !
View Related
|