Results 1 to 10 of 10
  1. #1
    chetana is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    11

    Add New Record In Unbound form on click of button

    Hi Everyone,


    Please let me know how to add new record in unbound form.as i tired using inbuilt add new button but its not working.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Why don't you just use a bound form and make life easy for yourself. Just curious.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    chetana is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    11
    Since I'm using sub form in main form..if i use bound form then i'm not able to select any data in sub form, if i save data then data saved 2 times in table,So I suppose to use unbound form.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	27 
Size:	22.1 KB 
ID:	42909

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by chetana View Post
    Since I'm using sub form in main form..if i use bound form then i'm not able to select any data in sub form, if i save data then data saved 2 times in table,So I suppose to use unbound form.
    I'm sorry but I don't understand your reply.
    if i use bound form then i'm not able to select any data in sub form
    What do you mean that you can't select the data and what would you do with it if you could.
    if i save data then data saved 2 times in table
    Why?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You probably need to review main form/subform design principles because you must be doing something wrong with that. There's tons of info/videos out there to help you.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by chetana View Post
    Since I'm using sub form in main form..if i use bound form then i'm not able to select any data in sub form, if i save data then data saved 2 times in table...
    Based on this I suspect that your main form and subform are both based on the same table...is that correct?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by chetana View Post

    Add New Record In Unbound form on click of button

    ...i tired using inbuilt add new button but its not working.
    Forgot to address why the native 'add a record' button didn't work.

    it doesn't work because you can't add a new record to an Unbound Form! In point of fact...an Unbound Form doesn't contain any Records! It only contains data that can then be used to create a Record in a Table.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    chetana is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    11
    Yes you are correct, main form and subform are both based on the same table.Can you tell solution for this problem?

  9. #9
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Why would you have a Main Form and a Subform based on the same Table? That makes no sense! This configuration is employed to show Records from different Tables that are related to one another...usually with a single Record in the Main Form's Table related to multiple, related Records in the Subform's Table.

    If it's a question of having a crowded Form, Control-wise, consider using a Tabbed Control with Controls on multiple Pages.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  10. #10
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Not that I care for them a lot, but if you must have a form that looks like a main form/subform but is based on the same table, then you might want to take a look at split forms. They are 2 views of the same data.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-07-2019, 05:34 PM
  2. Replies: 2
    Last Post: 04-06-2017, 05:22 AM
  3. Replies: 1
    Last Post: 09-07-2014, 10:15 PM
  4. Replies: 3
    Last Post: 10-08-2012, 08:40 AM
  5. Replies: 4
    Last Post: 07-22-2011, 12:52 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