Search results

  1. S

    New CSV has broken my database

    I'm sure there is an import specification that was being used when the orgininal csv file was being imported. All you have to do is to change the spec and you should be good to go. Check the code behind the import. There should be a line like this: docmd.transfertext, "SpecName" Now, do a...
  2. S

    Copy query listbox into table

    If you have data that is similar between tables, you should setup a relationship between them. You would store the data that is going to be similar in one table and assign a primary key to that record. Then, when you want to record a new record that relates to the previously stored data you...
  3. S

    form to reset a password

    On the logon form here at work, I have a button that allows a user to change their password. I have a bound field to the actual password (Visible Property = false) and an unbound field for the new field (Visible Property = false). When the button is clicked, the following code fires: Private...
  4. S

    Copy query listbox into table

    You can use the row source of the list box to define what you want to insert. sqlD = "INSERT INTO tblCardtoComponent(Card_ref,Component_ref) " & _ "SELECT DISTINCT qryCards.Field1, qryCards.Field2 " & _ "FROM qryCards" One question I have is why are you storing duplicate...
  5. S

    Look up Name in a Table

    Syntax for dlookup: Dlookup("[FieldYouWantToReturn]","TableOrQueryName","[CriteriaFieldName]=Value)
  6. S

    Limiting the amount of Records on a Listbox

    After you add a student, get a count of the number of occupants already assigned. Then compare that number to the number of available seats. When the two number become equal, you can prevent any more students from being added.
  7. S

    Question Add Same clients/cleaners...

    The problem is in the list box on the CleanerClientView. You have the PersonID linked, but in the tblPersonData you have the field as Text. Change the data type for PersonID in the tblPersonData to Number and you should be good to go. Not sure what you mean by that. Which form are you...
  8. S

    write conflict with subform

    The record source for the subform can contain all the records (ie. Select * from phys_exam_clinically_indicated). The Parent/Child fields should be the PatientID Also, when you run just the query, do you get the option to add records?
  9. S

    write conflict with subform

    Well, if I had to take a guess, it would be in your Sql statement. SELECT a.phys_exam_clinically_indicated_pk, a.exam_date, a.patient_cycle_fk, b.patient_fk FROM phys_exam_clinically_indicated a, patient_cycle b WHERE a.patient_cycle_fk =...
  10. S

    Question Move selected record from one table to another

    The problem with moving data around like that is that you are, in essence, storing duplicate data in multiple tables. This violates the rules of normalization. What you want to do is certainly possible, but I can gaurentee you it will bit you in the behind at some point down the road. Good table...
  11. S

    Question Add Same clients/cleaners...

    Because the Junction table will hold the cleanerID and the ClientID in the same record, you can record multiple cleaner/client combanations. You dont store the cleaner in the tblpersondata. Since the list of cleaners for any given client (ie tblPersonData) is stored in the Junction table, you...
  12. S

    Question Move selected record from one table to another

    Why not just have Yes/No field to denote who is cancelled and who isn't? Not sure what you are looking to do. Based on your other post, I am assuming that you are storing the current client that the person cleans for in the tblPersonData. Check your other thread...and go with the Junction...
  13. S

    Question Add Same clients/cleaners...

    What you want to do is to store the PK value of one table into another when you need to save a reference. In your case, you would store the ID of the record that has the cleaner information in the client table. Now, if you want to either A) record the history of cleaners or B) if there can be...
  14. S

    Hide and Show Label based on txtBox Value

    if nz(me.txtbox,"") = "" then me.labelName.visible = false else me.labelName.visible = true The nz will set the value to "" if the control is null. Place the code on the forms On Current Event and the After Update Event.
  15. S

    Automatically Removing Certain Numbers in Text Box

    What you are looking for is called Cascading Combo Boxes. The row source is built in code and assigned when the first combo box is updated. For example: ComboBoxA After_Update dim sComboRS as string sComboRs = "SELECT tblEndUsers.* " & _ "FROM tblEndUsers & _...
  16. S

    Copy fields in Form to Other Records in Table

    Well, if you only have two tables, and you use the contact number as the field to identify a record, all you have to do is to use that as the where clause. For example: UPDATE tblTableName SET FieldName = "New Data" WHERE ContactNumber = "Contact Number"
  17. S

    Copy fields in Form to Other Records in Table

    Actually, it would work in this instance. You just have to design your tables correctly. Ask yourself, "What information can have many different aspects for this order?" In your example, you state: This requires several tables: tblSchool SchoolID (PK) Address Phone Other info...
  18. S

    Force Table Entry

    I use a button for that on my forms. Me.CustBillFirstName = Me.CUST_FIRST_NAME Me.CustBillLastName = Me.CUST_LAST_NAME Me.BillAddress1 = Me.ADDRESS_1 Me.BillAddress2 = Me.ADDRESS_2 Me.BillCity = Me.CITY Me.BillState = Me.STATE Me.BillZip = Me.ZIP make sure you substitue your control names.
  19. S

    Modifying XL Spreadsheet Before/During Import

    Bob to the rescue :)
  20. S

    Automatically Removing Certain Numbers in Text Box

    I still have the previous example I made for you...so I added the Pass/Fail to it. I am assuming you want to test the Inventory Items from each Project, so I built upon that. Form 2 uses a combo box to select the project. The Inventory Items from that project display in the first list box...
Top Bottom