Search results

  1. G

    Syntax error - Missing Operator

    Running this code I get the error message about there being a missing operator iCounter = 1 Do Until iCounter = strResponse + 1 Dim strClonedGuest As String strClonedGuest = strCloneGuestName & "(" & iCounter & ")" Dim strSQL As String strSQL = " INSERT INTO tblGuest...
  2. G

    record source - which event

    I am trying to develop some skills regarding unbound forms. I have a subform whose record source is bound however I would like to change it to unbound. Where should I put the record source code? Should it be in an event or just something like Sub FormRecord()? thanks
  3. G

    Get primary key for record on sub form

    I have a main form open. When I open another form (OtherForm) I want it to get the primary key value of the item listed on the subform of the main form. In the Open event of the OtherForm I have; ipkID = Forms!fmMainForm!sbfSubFormControl.Form.CurrentRecord But it is not working Or do I...
  4. G

    Design advise - many to many?

    Afraid not. Understand the booking and guest tables. Do not understand the Addon table. In my scenario I have a Products table - and each record is allocated to a guest. As this is a many to many relationship I have a joining table between tblGuests and tblProducts called tblGuestProducts...
  5. G

    Design advise - many to many?

    This is exactly what I have done. All booking details are in tblBooking. tblGuests holds all guest details. These 2 tables are linked in a one to many relationship. Need to know who is taking the excursion. In fact all of the excursions or for that matter accommodations or bus trip generate a...
  6. G

    Design advise - many to many?

    Some narrative; Customer makes booking for himself and his friends (Guests of the Booking). Within the Booking, products will be allocated to each guest, which are consolidated onto one Booking ID for which an invoice will be raised - for the Booking; for example but not limited to; 1. Meet...
  7. G

    No unique index found for the referenced field of the primary table

    Thanks for your replies. Up to now I always thought natural keys (that coincidentally can be compound) were ideal but now I see some drawbacks. Your replies are unanimous in suggesting adding a surrogate key. However I think I will go the other way and create the compound index in the child...
  8. G

    No unique index found for the referenced field of the primary table

    Here is the table structure; tblGuestProducts ProductID PK Compound key, unique, Long integer GuestID PK Compound key, unique, Long integer tblGuestAccommodation AccomID PK GuestID FK Long Integer I am trying to establish Referential Integrity between these two tables based on...
  9. G

    Declare variables of input box

    What has me wondering was that they were defined as Variant type? The fields only accept string fields, and variant type take up more space. I just thought there might have been a specific reason for this style of definition.
  10. G

    Declare variables of input box

    Code of the MSDN site gives this sample code for an input box. Dim Message, Title, Default, MyValue Message = "Enter a value between 1 and 3" ' Set prompt. Title = "InputBox Demo" ' Set title. Default = "1" ' Set default. ' Display message, title, and default value. MyValue =...
  11. G

    Display editable filtered results on form open

    I have an order entry form on which I create a customer and then sell products. One of these products is Hotel Rooms. The workflow is select customer, sell a Hotel Room (updating tblTransactions) and then click a button which opens fmAccomDetails whose purpose is to capture additional detail of...
  12. G

    Calculated fields not updating table

    On formA is a button that opens formB. formB has some calculated fields whose Control Source is some fields on a sub form on formA - using the statement =[Forms]![formA]![sbfformA].[Form]![somecontrol]. And this works but those calculated fields do not update the formB's record source. Also...
  13. G

    Design advise - many to many?

    I am creating a database for a travel agent. In a nutshell it looks like this tblBookings BookingID PK BookingName etc tblGuests GuestID PK BookingID FK tblProducts ProductID PK ProductName etc tblGuestProducts ProductID PK GuestID PK ProductType etc This is the joining table Some of...
  14. G

    Drop down menu items

    I would like to create a button that when activated opens a drop down menu... like in older versions of Office where you selected a menu item from the tool bar which then opened a drop down list of other menu items. Naturally each menu item woudl be linked to code procedures. How do I create...
  15. G

    Syntax error

    I am trying to run this statement but receive a syntax error. The intention is to run this query collecting all records for GuestID 195 and appending the table with these same records but assigned to GuestID 196. That is the intention. strSQL = "INSERT INTO tblGuestProduct (GuestID, ProductID...
  16. G

    Append query or VBA

    Thanks Galaxiom, I figured I would pass the CustomerID and new CustomerID to it. Say CustomerID to copy from = OldCustomerID CustomerID to copy to = NewCustomerID and then run your code. Once I figure that out I will run your code. thanks
  17. G

    Append query or VBA

    I think my question has been answered http://www.access-programmers.co.uk/forums/showthread.php?t=199548
  18. G

    Append query or VBA

    I have a table that has the fields CustomerID, ProductID, Qty, SalesPrice. One CustomerID will have several records listing different ProductID's and prices etc. I would like to have a button on my form that can copy these details from this table of a particular CustomerID (specified by some...
  19. G

    Set text box equal to variable

    Using Builder I get #Name? Builder has written the formula as =[Forms]![frmGuestsbf]![txtGuestID]
  20. G

    Set text box equal to variable

    Not sure whether this should be in this or the Forms forum. I have a form containing a sub form. The subform contains several fields of a record, but not all of them. When the user selects a particular field of a record on this sub form a button becomes visible, prompting the user to select...
Back
Top Bottom