473,854 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a command button in a form to save & then open a new record

4 New Member
[z{mod-edit:Start of Original post}]
I wanted to have a Command Button on a form to save a record & then ask to open a new record. I am new to access.

I have MDFID on a form with primary key.

[z{mod-edit:Start of what was post 9}]

Thanks Seth,

To be frank, I wanted the save button to do the following:
1. Check if any fields are left blank.
2. If any fields are left blank then the button should not allow the user to save & prompt by giving message of the corresponding field which is left blank.
3. If all fields are filled then the button should save the record by enabling New Record button of a form (new record button should not be enable at the time of form entry).

Hope, I explained. Is it possible to do ?
Aug 29 '13
10 36214
5,501 Recognized Expert Moderator Expert

We are not a code writing service. Several answers have been given and we'll help you if you get stuck implementing them; however, you really need to do the work... think of this as site that teaches how to fish so that you can eat everyday.

By way of helping yo learn the basics, this is a site that I've used off and on... not my favorite site due to the age now; however, the Basics are still solid.

Some things to note:
  1. - The following is old.
  2. - It is for Access95.
  3. - Many of the new features are not covered.
  4. - Much of the user interface has changed... not so much from V95 to V2003; however, from V95 to V2007/2010 that ribbon makes a muck of things until you learn where things were moved.
  5. - If you are using Access 2007/2010 ACCDB files then ignore the part about the switchboard (in fact, I ignored the switchboard after the first time I used it and the end users just about hung me [:(] )
  6. - It covers some neat tricks with the Macro Language... be leary of these... they do have their uses and I use some of these upon occation when nothing else will do the trick!
  7. - the Author is BIASED against VBA! Do not let his negative comments about VBA un-nerve you. What he doesn't cover there is covered in the online help documents and help is available here and elsewhere on the Net :D next to SQL, VBA is the biggest workhorse and most powerfull tool you have in the Access database.
  8. - I mention this here only because of the age of the site I'm sending you to: There was a change in the database model... from ADO to DAO back to ADO and now back to DAO... the default model in V2007/2010 is back to DAO. ADO is still there; however, many of us use it only if we'll be upsizing to larger database such as SQL-Server, MySQL, Oracle, etc.. (others swear by ADO over DAO... you can find that argument elsewhere and I'll delete any posts in this thread that attempt to start it as a hijack };-) )

MS Access 95 Tutorial
Aug 31 '13 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

by: AccessHelp32 | last post by:
Hi All, I have a command button that opens an InputBox. I would like users to enter a string and have the InputBox open a Form and go to the record that matches the users string most closely. I'm using the following code with no luck: Private Sub Command3_Click() Dim Search As String, Message As String Search = "Find Program" Message = InputBox(Prompt, "Search") DoCmd.OpenForm "Programs", acNormal, , "Left(Program,10)...
by: rdade22 | last post by:
Hi, I'm new so try to bare with me. I'm using access 2000 and I created a database where the user is prompted to click on a command button and the info that was put on the form is sent to a table. This is what I have so far: Private Sub cmdadd_Click() Dim db As Database Dim rst As Recordset Dim strCriteria As String Dim intPointer As Integer
by: dgrabuloff | last post by:
i am inputting records using a form. how do i put a command button on the form that will copy the record i just input----sometimes i have the same record that needs to be put in 3 or 4 times and i would rather just be able to click a button and copy it.
by: sirimanna | last post by:
hi, Is any one can help me to open files in my computer(for an example: some word document)using command button... i want to open file's using my vb programme..but i can't do it...can any one help me? for an example there is a "open" button in every programme...i want cord for "open" bitton thanks..
by: tejavenkat | last post by:
Hi, I have one scenario i.e Download as csv is there it is a command button when we click on this the save dialog box should be open,Am using javascript how can we do this by using by javascrpt .Plz suggest me any body? Thanks & Regards Venkat
by: mesadobes | last post by:
I am very new to visual basic. Actually, I have no clue what I'm doing! But I know what I want to do. I am trying to learn as I go... How do I create a command button that when clicked will automatically send the worksheet via email to more than one recipient? I have searched and searched and tried different things. This is what I have tried but it didn't work. Under the command button's code: Dim Rcpts(1 to 3) As String Rcpts(1)...
by: mdpems | last post by:
The organization I work for needs to use a form that we can send to a billing department that shows supplies we used and Mission#'s. I have a form to select supplies used and total the costs of those supplies. I also have a field on this form that is called Mission#. What I want to do is create a command button that will save those two fields only to another table. Is there a way to do this. I was also wondering if I can have this button...
by: pld60 | last post by:
I have a bound form to a table. I have a command button to save when clicked that uses the following code. Private Sub Commandsaverecord_Click() On Error GoTo Err_Commandsaverecord_Click DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Exit_Commandsaverecord_Click:
by: beacon | last post by:
Hi everybody, I have a main form, frmDeficiency, that has a tab control, deficiencyTabControl, that has a subform, fsubEpisodeDetail, on page 2 of the tab control. I also have a command button on the main form that I'm going to be using to submit the data. The main form is bound to a query, qryPatientDetail, and is filtered using a search form. The subform is currently linked to the main form with PatientDetailID as the Master and...
by: marvinisla | last post by:
i am complete newbie in ms access 2007. I want to ask how to save unbound textbox value in a table using a command button? and also how to put a clock in a form. tried all the tutorial from the net.. the time interval property and the ontimer property = vbcode also done but none of them work.. please help me.. thanks
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.