Search results

  1. E

    Input form for related one-to-one tables?

    'Category_Dataport_ID' should be a foreign key in the Category_Details table, not a primary key. Category_Details should have its own separate primary key. You can create a main form with a sub-form whereby the 'New_Category_Dataport' becomes the recordsource of your main form and...
  2. E

    if.. table is empty then...

    Try: If RsDebit.RecordCount = 0 then ......your code here. End If
  3. E

    Is dcount the right way to go???

    Try this: Dcount("[FieldName]","tableName","[FieldName] = -1") Substitute your own field and table names accordingly.
  4. E

    Date selection

    Your query needs two dates (from date) and (to date) to accomplish what you want. One way to supply these dates is via textboxes in your form. In design mode of your query, in the criteria line of the date field, you need to enter somethings liike this: Between forms!formName!fromDate AND...
  5. E

    Query from another form

    Try: Me.listbox.rowsource= "SELECT * FROM tblExams WHERE PatientID = " & Me.txtPatientID, assuming: - your exam records are in a table called tblExams & contains the foreign key PatientID and your main form contains a textbox called txtPatiendID. Substitute your own table name for tblExams.
  6. E

    User/Password Table to log in

    Try this: If Me.txtpassword.Value = DLookup("Password", "tblUsers", "[UserID]= """ & txtUserName & """") Then
  7. E

    Access query linked to excel

    Link to the Excel spreadsheet via the "File", "Get External Data" option. Once linked, you can treat the excel just like any other Access table.
  8. E

    MsgBox Style

    MsgBox "Your Message Here",vbinformation will give you the yellow exclamation MsgBox "Your Message Here", vbCritical will give you the red x mark
  9. E

    msgbox, Pleeeeeeease HELP ME AS SOON AS YOU SEE THIS!!!

    Try the left function to extract the first position of the name, e.g.: Left((Me.Name_of_Employee),1) HTH
  10. E

    Code for opening form based on value in subform sitting in another form

    When you open a form, you can supply arguments to it. The third argument is a WHERE clause that is a valid SQL statement but without using WHERE. This should allow you to open form C containing only the record you selected in form B. Look in Access Help to learn more about a form's open...
  11. E

    Sum Problems

    In design view of your report, go to last section called "Report Footer" . Create a textbox there and in the control source, enter: =Sum([FieldName]) This should give you the total of the column/field you want to total.
  12. E

    printing problems with subforms

    In design view of the report, right click anywhere and choose sorting and grouping. This is where you control the sort order of your subform.
  13. E

    Record Navigation Problems

    The recordsource of your Tab "All" is a query. This may be the problem. I changed the recordsource to the table itself and it worked flawlessly. Please try it that way and post back .
  14. E

    Record Navigation Problems

    That behavior sounds unusual; please post your stripped down db so interested parties could look into it.
  15. E

    AddRecord button on form - additional functionality

    Try this code: Dim intCount as integer intCount = DCount("[EndDt]","tRCAAssignments","[Territory] = [Forms]![fTerritoryAssignments]![Territory] AND Not IsNull([EndDt])" If intCount>0 then msgbox "Can not add new record..",vbinformation Exit Sub EndIf Note: code not tested, but I think...
  16. E

    Access 2003 Events Procedure Problem

    One possible approach is to pop up a message box reminding the user to back up the files you were mentioning. A VBA code could be written in the On Unload event of the form you are interested e.g.: Msgbox "A reminder to back up files....", vbinformation (or vbCritical if you choose to be more...
  17. E

    Hotel Room Availability Query

    I see what you mean. Try creating another query using the query wizard. Choose the "Find Unmatched Query Wizard". This should allow you to use the earlier query you created to be compared against your tblRoomState table. The result should be entries in tblRoomState that do not appear in the...
  18. E

    Hotel Room Availability Query

    Not sure if I understood your problem correctly, but it looks straight forward. To filter out records available as at a certain date, set the condition on the state field to: <>1; and of course the date you are interested in.
  19. E

    Show only moved courses

    try adding another condition: And Not IsNull(SalesForecast.MoveDate) should pick up only those records with values entered in the field MoveDate.
  20. E

    Duplicating Field and Format Change

    Try using the Cstr() function to convert your autonumber field into text. It converts numbers into strings. Have not tried it on autonumber fields, but I think it will work there, just like a regular number field. In query design, create another field e.g.: Exp1:Cstr(YourAutoNumberFieldName)...
Back
Top Bottom