Search results

  1. M

    Delete query

    Hi, Why is this delete query not working? DELETE tblAllocations.*, ([tblAllocations_1].[EmployeeNo]=[tblAllocations].[EmployeeNo]) FROM tblAllocations, tblAllocations AS tblAllocations_1 WHERE (((([tblAllocations_1].[EmployeeNo]=[tblAllocations].[EmployeeNo]))=True)); Thanks guys!
  2. M

    Unbound form - make a required field

    hello, As in the title, I've created unbounded form to add new record (job). How do I make the ClientID field required? Thanks!
  3. M

    One more field

    Hi, How do I change the code below to include one more field in the second combo box i.e. ServiceNo. I want both ServiceTitle and ServiceNo to appear (there are both in the same table). Private Sub ClientNo_AfterUpdate() Me.ServiceNo.RowSource = "SELECT ServiceTitle FROM" & _...
  4. M

    Change IF Statement

    Hi, Could someone please add to the IF Statement below one more field: BusinessName. Besically, if the Forename and Surname are NULL the BusinessName show appear and vice versa. Client Name: IIf(IsNull([Surname]),IIf(IsNull([Forename]),[Forename]),IIf(IsNull([Forename]),[Surname],[Forename] &...
  5. M

    Count field

    Hi, How do I make a field on a form that shows (counts) the number of records selected on a list box? Thank You!:o
  6. M

    Many to Many + Availability

    Hi, I have this problem and if I don't figure out how to do it, the database I'm creating is very much pointless. I have 3 tables: tblEmployees, tblServices and because this is many to many relationship I created 3rd table tblAllocations (only two fields: EmployeeID, ServiceID but I'm using...
  7. M

    How to combine the two?...

    Hi, Basically, I've got to separate queries. 1st that shows services in a given time frame (defined by user) and 2nd that shows not allocated employees (using "Is Null"). What I need now is how to combine the two queries taking into account the fact that employee might be allocated to a job...
  8. M

    On error cancel event

    Hi, Quick question.. What code should there be between DoCmd.RunCommand acCmdDeleteRecord AND DoCmd.Close If I don't enter any data I get a msg "Record cannot be deleted at this time.." so I need a code that on error would cancel the event and carried on with closing the form. This is the...
  9. M

    Easiest way to do...

    Hello, I have many to many relationship (services to employees) so I've broken it down into 3 tables. In the 3 table I use combo box to choose service (ID, title) and employee (ID, full name) My question is... what is the best way to present this in a form taking into account the following...
  10. M

    IF code

    Hi guys, I'm complete newbie with VBA. I have this form with a combo box to select either "Residential" or "Commercial". If "Residential" is selected I want Title, Forename and Surname fields enabled and Business Name field disabled and vice versa. I have this VBA code: Private Sub...
  11. M

    Improving business by going online

    Hi! I am helping a friend of mine with his business which offers building and constructions services. I am looking for some ways to improve its performance. I was thinking about an on-line system (some kind of website/ message board?) I don’t actually know. The idea is that clients could access...
  12. M

    Calendar - Help Needed

    Hello everyone, I wish to make a calendar which shows dates already booked by customers. All bookings from all records must be shown on the same calendar, but the thing is that these are not one day bookings. In my table I have ‘CommenceDate’ and ‘Duration’ (in days). I use a query to calculate...
  13. M

    IF Statement

    Hello Guys, One question, maybe simple, maybe not but hopefully someone can help me, I've got this: IIf([tblWorks.WorkStartDate]<Date(),IIf([qEndDateForWork.WorkEndDate]<Date(),"Work Done","Work In Progress"),"Future Work") AS WorkStatus besically, this takes the data from tblWorks and a...
  14. M

    Save record code

    Hello every1. I am looking for code for a cmd button that will give a msg "Do you want to save changes?" with YES and NO options. If yes then the record will be saved a the form closed if No form wil be closed but no changes made to record. Thanks is advance!
  15. M

    A report that chooses between two addresses

    Hello, I am trying to create a report that will be showing details of the appointment. There are address details that have to be displayed and here is a problem I don’t know how to solve because I have address details in the customers table and in the appointments table. If the address...
  16. M

    REALLY complex macro

    Hi every1, I have to create a macro to automate some procedures. I know some bits of it but sometimes I'm just confused. The macro should: 1. run query (the query will create table tblDatesDifferences) 2. open table tblDatesDifferences 3. add new column 4. rename column for EndDate 5. change...
  17. M

    Urgent answer welcomed!

    Hello, I have a question. Is that possible to find a number of days between two dates BUT if those two days are from different record? (if we assume that dates are in ascending order) (uk date format) For example: StartDate EndDate Record 1 01/02/07 28/02/07 Record 2...
  18. M

    Count Null records AND......

    Hi guys, I know how to count records so that null records would be counted but I do not know how to do this: I have customers and works. I want to create a query that will show ALL customers and number of works done for that customer (sometimes there is no work done for customer). How can I...
  19. M

    "IF" code needed

    Hello, I am looking for a code that will be showing the status of the work I’ve got. I have 4 text boxes on the form: StartDate ; EndDate ; CurrentDate and WorkStatus. The StartDate and EndDate are linked to the tblWorks. As the default value for CurrentDate I have =Date() . I need a code that...
  20. M

    Code needed

    Hi evry1, I want to create a form that will be showing the status of the work i.e: work done, current work and future work. I have “start date” and “end date” for each work. I want a text box that will be showing if that is a current work, work done of future work. Does anyone now what code...
Top Bottom