Search results

  1. G

    Update Query End Of Statement Error

    Nice one, cheers mate! Yeah I know there's some bad naming conventions, unfortunately I inherited this database when I got promoted and it's not exactly been designed well...
  2. G

    Update Query End Of Statement Error

    Hi All, I'm trying to write an UPDATE line in VBA, but whenever I put the table name I get an "Expected End of Statement" error. This is line currently; strSQL = UPDATE "MASTER PLANNER" SET [SET 2] = TRUE WHERE "[ID] = " & Me.PlannerIDIt doesn't matter whether I change the table name to...
  3. G

    DLookup Doesn't Return Correct Value

    Ignore me, turns out I can't spell....... The field in the table is actually called [JOB NO], not [JOB NUMBER] as was written in the code..... Herpa derp.
  4. G

    DLookup Doesn't Return Correct Value

    Yeah definitely. ID is a numerical ID field, [JOB NUMBER] is a string (like this; S019191-1) and JOB_NUMBER is the field on the form. The code I have using a variable is this; Dim JOBNUM As String JOBNUM = Me.JOB_NUMBER MsgBox ("" & JOBNUM & "") JOBID = DLookup("[ID]", "[MASTER...
  5. G

    DLookup Doesn't Return Correct Value

    Tried that earlier, no luck... I've also tried creating a separate string to get the value of the text box before running the DLookup, but I get the same results.
  6. G

    DLookup Doesn't Return Correct Value

    See this is where it gets annoying, it's actually a string i.e "S019191-1", not just a number... :(
  7. G

    DLookup Doesn't Return Correct Value

    Hi All, I'm trying to use a DLookup to get a specific value from a field in a table. This is what my code currently looks like; JOBID = DLookup("[ID]", "MASTER PLANNER", "[JOB NUMBER] = '" & JOB_NUMBER & "'") Basically I want to get the ID (a number) from a specific record where the JOB...
  8. G

    XML Attributes

    Hi All, I've managed to get my table exports near enough how they should be looking, I've got the nested nodes perfectly aligned to my sample. The only part missing is the attributes in the nodes of the XML. Here is my sample; <tg:order tg:replace="true" tg:site_code="SC"...
  9. G

    XML and XSD Imports

    Hi, I've been given a sample XML file and an XSD Schema file, and I'm to build a database based around these files. I'm trying to import the XML, and the tables are created fine. I then create a query to include all of the fields into one XML export. I then export the query, and it comes out...
  10. G

    Update Record Based on Related

    Well the end result will just be ticking a field, but I understand where you're coming from. Even before the update, how could I call up all of the main records that have all their related records marked as COMPLETED? I assume this would be an expression in a query, but what specifically would I...
  11. G

    Update Record Based on Related

    Hi All, I have 2 tables, one is like a main table, containing all of the main data, such as a Job Number, Customer, Quantity, etc. I have a second, related, table that acts a breakdown of information. There may be several related records to one main record, it entirely depends on the nature of...
  12. G

    Parent Child Query Help

    I can't show you what the report would look like because I can't work it out! Essentially, it's just showing a massive number in the NO OF IMAGES when it shouldn't be that big. I've tried that but I need to sum the quantity, that would just give me a record for each number where I only want...
  13. G

    Parent Child Query Help

    Hah sorry, it's the print industry and I don't really know how to get around it! Parent Table (MASTER PLANNER) MailDate, JobNumber, MailingQty, ImageQty 15/10/2014, S019191, 1000, 2000 15/10/2014, S024651, 150, 150 20/10/2014, S025871, 300, 450 Child Table (MAILING CELLS) (the link between...
  14. G

    Parent Child Query Help

    Hi All, I'm trying to create a capacity report for my database. Originally, I only had the one table, which summed the number of Packs and number of Images, worked out percentage capacity used and then put it in a report, showing for each week of the year. However since then, I've added a...
  15. G

    Report Conditional Hide Section

    Hi All, I have master and child fields in my query, and in my report I have blank controls where there is no child record to the master. I'm trying to set the section (Group Header and Detail) to be invisible when there's no value in a control. However, as soon as I introduce an If statement...
  16. G

    IIF Criteria Help Needed

    Hah no worries, this has got it perfectly! Thank you both for your help!
  17. G

    IIF Criteria Help Needed

    SELECT [MASTER PLANNER].*, [MASTER PLANNER].[MAIL DATE] FROM [MASTER PLANNER] WHERE ((([MASTER PLANNER].[MAIL DATE])=IIf([MAIL DATE]<Date() And [COMPLETED]=False,[MAIL DATE]<Date(),[MAIL DATE] Between Date() And (Date()+1)))); That's the complete SQL with the criteria in.
  18. G

    IIF Criteria Help Needed

    Ah, ok. Could I try doing this with a Union query?
  19. G

    IIF Criteria Help Needed

    Yes, but using it as an expression poses the same problem.
  20. G

    IIF Criteria Help Needed

    Hi All, In my query, I have the following criteria; IIf([MAIL DATE]<Date() And [COMPLETED]=False,[MAIL DATE]<Date(),[MAIL DATE] Between Date() And (Date()+1)) However, this brings up no results. I just want it to look at all the records and find the ones that aren't completed before...
Back
Top Bottom