Results 1 to 8 of 8
  1. #1
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476

    Saviing a Form with empty field

    Sometimes when I have a Forrm which has an empty fld I can filter the empty fld, save the Form under a new name, & the new Form only shows me the Records with the empty fld/flds. Yet, in other times/Forms it doesn't work; I filter the empty fld, save/rename the Form, but when I open up the Form it shows all of the Records. Can anyone give me any insight on my delimna?



    Thanks in advance

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The form is not saved with filter criteria. Either fix the RecordSource of the form to include filter criteria or set the Filter property of form in design view and save.

    Why duplicating forms?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    June,

    I don't quite understand you asking, "Why duplicating forms?" I have a Form (datasheet) which shows the, 'VehicleID, 'CustomerID,' 'Payment' (Credit or Cash), 'AskingPrice,' 'SaleDate,' 'SalePrice," ect.

    I wanted to create a similar datasheet Form which no 'Vehicles' have been sold. In the "CustomersID' fld is a Combo Box which shows the customer's: age, how many vehicles he/she purchased, & their monthly income. Would you be willing to tell/show me how to go about to include filter criteria or set the Filter property of a Form? Meanwhile, I'll Google, "Filtering in Forms."

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You copy/paste a form and so you have multiple identical copies of form? Sounds like a maintenance headache.

    I guess I don't understand what you are trying to accomplish with copy/paste of form. If you want to filter form recordset then why not build dynamic filtering into form. Here is one method: http://datapigtechnologies.com/flash...tomfilter.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    June,

    guess that we don't see eye-to-eye on this -or- more like I'm not understanding your explantion/point.

    Can I bothered you with anther unrelated ? to this thread? Ok, when yiu have a 'DateofBirth' fld, 11/5/1995, you can in a query find out their 'Age' with DateDiff function Age: DateDiff("yyyy",[ctmDOB],Now()). However, what if you only given the 'year' a person was born xx you want an 'Age' fld in your query. is there any way you can figure how how many years between just '1995' to Date() (or DateNow())?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Sometimes seeing brings understanding - if you want to provide the db.

    Extract the year from the date value. You can extract any component of a date (use Date() or Now()) with various functions:

    Year(Date())

    Month(Date())

    Day(Date())

    And others http://office.microsoft.com/en-us/ac...001228809.aspx
    http://access.mvps.org/access/datetime/date0007.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    June,

    I'll try to prepare the db tomorrow & send it to you.

    But, I don't think you're following my second question. You say "You can extract any component of a date (use Date() or Now()) with various functions." I don't have "Dates" like 11/12/2012. Yea, I know that you can just extract the 'mnth' or 'yr' etc from the "Date." I'm sort of asking the reversal, if you just have the "year" NOT IN DATE FORMAT can you somehome put the "date" data in Date/time format so that I can perform date calc...

    Please excuse me if I'm too forword, I don't mean to. I really get frustrated with myself sometimes

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I believe I did understand. You want to calculate age. That means subtract the birth date from current date. You have only year for birth date so extract the year from current date.

    Year(Date()) - BirthYear = age in years

    or pick a month and day and build a full date for birth date

    Date() - DateSerial(BirthYear, 1, 1) = age in days because days is default unit when calculating with date values unless specified otherwise

    or

    DateDiff("yyyy", DateSerial(BirthYear, 1, 1), Date())
    Last edited by June7; 11-18-2012 at 01:25 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Code to check if field is empty
    By darekg11 in forum Forms
    Replies: 2
    Last Post: 09-18-2012, 03:15 PM
  2. Replies: 2
    Last Post: 04-23-2012, 10:13 PM
  3. Replies: 4
    Last Post: 11-20-2011, 01:08 PM
  4. Delete Field if Empty?
    By bpowers2010 in forum Reports
    Replies: 1
    Last Post: 07-10-2010, 12:04 AM
  5. empty field
    By amber mara in forum Access
    Replies: 2
    Last Post: 05-05-2010, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums