Search results

  1. P

    Open form to record with button on current form

    Sorted = [Membership_No] = is the table field name Not the form field name [GMembership_No], and yes, then it was type missmatch. Private Sub cmd_gmem_Click() ' Looks for any record for this MembershipNo where MembershipNo. match' If (Me.Status <> "C") And (Me.Status <> "P") Then...
  2. P

    Open form to record with button on current form

    Thanks Minty but that's not the problem. It is the OpenForm 'where' condition that is not working. Status is never Null and that part of the If statement is working correctly.
  3. P

    Open form to record with button on current form

    I have a button on form Membership with ID [Membership_No] and trying to open "frm_gmem" with ID [GMembership_No] at the current record. The preceeding If msg works as expected but if false brings up Enter Parameter Value prompt for GMembership_No Left blank or given an ID number, it still...
  4. P

    Retreiving postcode

    Finally fixed this. Original post: "I have a table MembershipList, containg the field PostCode and a form with field Code (contain AA or A). This code works: WHERE (((MembershipList.PostCode) Like ([Forms]![frm_membcode]![Code] & "*")) but returns all possible A# and AA codes." Created a pre...
  5. P

    Question Date format change on save

    Penny/Bomb finally dropped and got the corrent use of format from allenbrowne's link Thanks to all who responded.
  6. P

    Question Date format change on save

    No removing the ## turns 12/07/2016 into 30/12/1899
  7. P

    Question Date format change on save

    I have tried both of these and also yyyy/mm/dd, in all cases the mm/dd are reversed.
  8. P

    Question Date format change on save

    Presumably 'expression' would be my CStartDate, so: Format([CStartDate],"\#mm\/dd\/yyyy\#") Where do I put this?
  9. P

    Question Date format change on save

    This all looks much like a number of Google replies read and that Access SQL expects mm/dd/yyyy but I am still none the wiser as to how to Actually achieve the result of saving the date in my required format.
  10. P

    Question Date format change on save

    Ok it get now that problem is the SQL engine totally ignoring both my format prerance and regional settings - sounds like a bug to me! However, how do get my code to save a date entered as dd/mm/yyyy and save it in that format? The following code updates the table field 'Start Date' with value...
  11. P

    Question Date format change on save

    I am in UK and the computer is set correctly for my location as dd/mm/yyyy. Is there a default for the database then?
  12. P

    Question Date format change on save

    I have a strange problem with date format. The problem is that dates for day 01-12 are converted to mm/dd/yyyy on saving. Whiles dates for day 13-31 are saved in the correct format. There is a subform that allows updates to the main form. The date field on both forms has the Format specified...
  13. P

    DCount syntax error or similar

    Sorry found it, my error. I had not specfied the correct form. Dim stDocName As String stDocName = "frm_memnocar" The perils of copying and modifying code!
  14. P

    Retreiving postcode

    Choosing Area, through a form field, returns the pick Code: Code Area AB Aberdeen AL St. Albans B Birmingham BA Bath BB Blackburn BD Bradford The Code is then matched to the first alpha charaters in the PostCode field on the...
  15. P

    DCount syntax error or similar

    Tried this but gets a similar error: 2467 "The expresion you entered refers to an object that is closed or doesn't exist."
  16. P

    DCount syntax error or similar

    I have a table OwnershipLog including fields Membership_No and [Current Owner] and want to retrieve [Current Owner] using open form field X_MemNo This Code: If DCount("[Current Owner]", "OwnershipLog", "Membership_No = " & Me!X_MemNo & " ") > 0 Then MsgBox ("This Member is...
  17. P

    Retreiving postcode

    I have a table MembershipList, containg the field PostCode and a form with field Code (contain AA or A). This code works: WHERE (((MembershipList.PostCode) Like ([Forms]![frm_membcode]![Code] & "*")) but returns all possible A# and AA codes. I have found suggested code using: LEFT(my_field, 2)...
  18. P

    Adding and editing records fropm unbound fields

    Yipee! Finally got this sorted. The update is worked fine but not all the addnew. By adding one field/value at a time everthing is ok until the date field. Put it back as numeric at the end and all is still working.
  19. P

    Adding and editing records fropm unbound fields

    Getting no where with any of this! This code with ) removed and ampersand added gets to the last line before going red on compile. Dim strSQL As String strSQL = "UPDATE OwnershipLog SET OwnershipLog.[Current Owner] = Null " & _ "WHERE OwnershipLog.[Chassis_No]= '" & Me.CChassis_No &...
  20. P

    Adding and editing records fropm unbound fields

    Thanks that moved me in the right direction, finding a whole world of definitions under Tools/References. Found ADO and DAO but also "Microsoft Office 14.0 Access datasbase engine objects library" which once ticked gave what I originally wanted. Stange it was not already loaded presumably an...
Back
Top Bottom