Results 1 to 9 of 9
  1. #1
    francogaspari is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    14

    Form Command

    Hi.
    if i have two forms , "frmNewClient" (where to add the new clients) and an "frmOrder",


    and beside the box of the client name on "frmOrder" i create a command button and name it "ADD NEW CLIENT" in case i need to add a new ONE
    my quest. is how can i link this button to open the "frmNewClient", and the time i add the new client and save it , i need to display automaticaly the name of the new customer ,that i already added, in the client name box, on "frmOrder" to continious my Order details.
    thank you.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You want to open a form that pops-up so a user can add a new record to a table?

    Docmd.openform, acform "formname"

    The trick is saving records so any bound forms that remain open during the append process do not throw a warning to the user that the record they are on has been edited by another user.

  3. #3
    francogaspari is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    14
    ItsMe thank you .
    but what i need exactly is, i want to an auto display of the name of this new client in the client box on frmOrder, without to search on his name again by a combo box for example. so will that works?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    From within your frmNewClient form

    Forms!frmOrder.TextBoxName = Me!ClientField

  5. #5
    francogaspari is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    14
    ItsMe thank u so much
    but i am not an expert one here. can you explain more ?

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    What do you have so far? I understand you have two forms. What have you tried and what functionality works? Post code.

  7. #7
    francogaspari is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    14
    this is an example, and what i asked , as i am new on ACCESS , didn't understand well where to put this code>>>>
    Attached Files Attached Files

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    So you want to add the value from the field ID (tblClients) to the field ClientName (tblOrder)?

    A typical way to do this is to add a combo to your frmOrder. Include the ID field and the description (maybe FirstName and LastName fields). Adjust your combobox's Bound Column property to be column 1 and the combobox's Bound Column property to be your ID field.
    http://www.datapigtechnologies.com/f...combobox3.html

  9. #9
    francogaspari is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    14
    ItsMe thank you again .

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

Similar Threads

  1. Form Command Button to .pdf on Sharepoint
    By tmcrouse in forum Forms
    Replies: 2
    Last Post: 05-08-2014, 12:38 PM
  2. Replies: 1
    Last Post: 05-23-2012, 01:32 PM
  3. Replies: 2
    Last Post: 05-11-2012, 11:52 AM
  4. Form Command buttons
    By chazcoral2 in forum Forms
    Replies: 6
    Last Post: 05-01-2012, 08:10 AM
  5. Command Buttons on form
    By bespra in forum Forms
    Replies: 10
    Last Post: 11-12-2011, 01:50 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