subForm Not Adding Record

I have a subForm that has all of its fields populated with default vaules 
from the Main form (=[form1]![Field1]).  No problem, I can get those to fill 
in, when I attempt to save that record, into another table, Access will not 
write the record.  The AutoNumber field is still says <AutoNumber>.  If I 
click in a field and change the value, the auto number creates a record and 
away we go.  No problem.

I tried using a button with the doCmd.RunCommand acCmdSaveRecord, to no 
avail, and I tried using the button wizard write this:
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Nothing there either.  I can't use the goto New Record because I need the 
information in the DhallID field in the Where condition on an OpenReport code.

The only thing that works is if I change a value on the subform and hit TAB. 
 the Autonumber populates and the record saves with the save command above 
and the report that is tied to a DhallID is printed.

How do I get the button to save the record when the <AutoNumber> doesn't 
populate until I change some information on the subForm?
Thanks As Always
5/31/2007 6:25:02 PM
access.formscoding 7493 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 9


Similar Artilces:

Adding a calculated ROW to a pivot table
Does anybody know how to add a calculated ROW to a pivot table? I have a pivot table that is returning totals at the bottom, as it should, but I *also* need it to return that total as a percentage of grand total, directly beneath the total. I've always done this free-form in the cells below a pivot table before, but the size of this pivot is dynamic so that's not an option. Also--I'm using the pivot in Access, not Excel directly. Anybody have any tips? Thanks! ...

Record Macro Relative does not work?
Can someone help me with this macro. I want to go to any cell of my choice and press f2 to edit, then go to the fifth character of that cell, then select the next 6 characters and change them to a smaller font size (8), then "enter". I tried to make this macro using the record macro function, but it did not work how I want it to. It ends up pasting the contents of the cell which I used to record the macro initially. Can this kind of macro be done? To get a relative recorded macro, make sure the stopr recording toolbar is visible, it has 2 icons, one is to s...

Error when no records meet criteria
Hi, I have the following code and receive error 1004 Application defined or object defined error on this line Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=AND(RIGHT(D2)<>""r"",B2=4)" Selection.FormatConditions(3).Interior.ColorIndex = 7 because there are no records in this instance of the report for "4" in ColB. I've searched and applied code all to no avail. Can someone please tell me how to write code for when this may occur in any of the situations below? Range("b2:b800").Select ...

Adding functionality to MS Outlook Express
Hi, I am looking for help to integrate anti-spam open source programs with MS Outlook Express :- - SpamPal - - Spamato - The problem is to provide a library that will facilitate this. I have read the MSDN Messaging and Collaboration documentation which gives the ability to get notifications of new messages and to access message folders :- The next need is to add a toolbar (with buttons for SPAM/NOSPAM) and to detect what messages are selected in the message window. The MSOE...

Auto Filling Fields in Current Record from Previous Record
Hello, I have looked through posts related to Auto-Filling a field from a previous record but am still a little unsure of how to do things. What I would like to do is auto fill a field in the current record with one from a different field in a previous record. What I have is a form that records "engine hours" and "tonnes moved" for a piece of equipment. The operator will record the staring hours and tonnes (at the start of a day) and the hours and tonnes at the end of the day. So in the database, I would like the "Starting Hours" and "Starting Tonnes"...

Not saving records till "save" command button clicked
If you are in a form and adding information, then close out or go to a new for it just saves the record as long as all applicable fields are filled out. Is there a way to only have a record save if a command button is clicked? -- Message posted via If you simply hide the form instead of closing it, I think that will prevent the save. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "szag via" <u2885@uwe> wrote in message news:a75249f4b37bb@uwe... > If you are in a form and adding informat...

More than 100 records in Look Up Records dialog window
Does anybody know, how to get more than 100 records in Look Up Records dialog window? For example in Opportunities - I want to add an existing contact to the opportunity, but I can see only 100 records. I dont want to specify any character, I need to choose from all contacts. (It is not the same problem as paging, PagingLimit in SQL can not help) -- thanks Ivana ...

Adding company name to the "From" field
Hopefully this is an easy problem. We are running Exchange 2003 on Windows Server 2003 in a mixed domain. (Win2k and Win2003 servers) Lets say I am working for a company named "XYZ". The owner of the company wants the "from" line in the email client to say "Bill Smith, XYZ Company". Unfortunately I can not find a way to do this. Any help is appreciated. Bob Hi Bob, Just use ADModify to rewrite the Display name for every user in your company, or for users of that company (if companys are sharing and AD) ADModify can be found here:

How to sometimes open form to new record?
I have a parent form which is then linked to a child form. I want to have two buttons on the parent form, one to open the child form and display all the records with the corresponding foreign key, and one button to open the child form to a new record with the corresponding foreign key already inserted. I have figured out how to open the child form to a new record, but I cannot figure out how to insert the parent ID into the child foreign key. Help! Thanks. Megan, You don't have to enter the ParentID in the Child subfrom records... Establish a one many relationship between the Pa...

Count number of records after filtering
Hello, Probably a question that's easy to answer but I have been searching for hours now & it's driving me rather crazy: I have applied a filter to a form and now I want to know how many records I have got as a result, or better, I want to know if there are any records left - how do I do that? Tried so far: If Form.Recordset.Count = 0 Then ... If Iserror(Form.RecordSet.Count) Then ... If EOF(Recordset) Then ... but that all does not work. Thanks, Gerwin Gerwin: An easy way is to add a hidden text box, txtCount say, to the form, with a ControlSourc...

Select Records that fall in an external set of ranges (subquery)
HiI have not done subqueries before so I am a bit confused. I have twotables1 - Phone Numbers - (converted to be numeric) (with other fields forlater) and2 - Exchange codes - multiple entries for code with 3 fields -Exchange name (duplication) - Start Range and End Range.I want to return a list of phone numbers that fall into the range fora certain exchange.For example - MRSPOO has 4 entries in the Exchange Table with 4distinct ranges. 200-299, 307-788, 997-1102 and 2036-6698. I would like to be able to return all the phone numbers for a singleexchange code that I would select (using a query...

ActiveX control being added to outgoing e-mail?
I have a user running Outlook 2003 via Exchange 2000. All outgoing messages sent by his system apparently have an ActiveX control in them. Any messages I try to open on another machine give the alert "Your current Security settings prohibit running ActiveX controls..." Could this mean the user has a virus? Something else? Any help is appreciated, and a direct reply to me is appreciated as well. Thanks, John M John discovered this was due to bad signature or stationary files in Outlook. I had the same problem with a user and tested this theory. There was indeed some c...

copy record between tables
Hi, I have two tables with same structure. I need to copy a record from oneto other using vba codes. I'd like avoid to copy field to field.Thank you. Without knowing anything about your table structures, something similar to the following:Dim strSQL As StringstrSQL = "INSERT INTO tblCopy SELECT tblOriginal.* " _ & "FROM tblOriginal WHERE tblOriginal.KeyValue = 4"CurrentProject.Connection.Execute strSQL"Alberto" <saveas[at]> wrote in message news:uk2oUMBYHHA.3656@TK2MSFTNGP05.phx.gbl...> Hi,> I have two tables with same structure....

Highlight a selected record
I am trying to highlight a selected record of a continuous form. Conditional Formatting is not working because it highlights individual fields. If Conditional Formatting would highlight the entire row, it would be perfect. I created a txtBackground text box to size of all my fields, sent it the back—behind the fields. Use the txtBackground as the control, but when it has focus it covers the data. Below is the code I used: Sub HighlightControl(ctl As Control) On Error Resume Next ctl.BackColor = 65535 End Sub Sub UnhighlightControl(ctl As...

Problem with AD-users
Hi, Ive done big mis-deleting. Ive tried to do one new DL-object for exchange. Its usually placed under users-coNtainer. The Distribution List I made, was false, so I had to be delete it. But, somehow Ive deleted a lot of objects from users-container! There did not existed many users they are in separate containers, but some were like administrator! I thin, it isnt possible to delete admin-account. The account still exist, but I think its properties arent now OK. I cannot add administrator account for administrator or any mailbox. Exchange system tool wont regocnize ay useraccounts. B...

Record data on two lines
Sorry about repeating the post but I think I messed up the first one yeaterday! I am receiving a spreadsheet from an agency with record information on two lines. Example: Record 1: A1, B1, C1, D1, A2, B2, C2 Line 3 blank Record 2: A4, B4, C4, D4, A5, B5, C5 There are over 100 records like this. They claim they can't fix it... It originates from a Crystal Report. How can I change the data so each record is on one line: Record 1: A1, B1, C1, D1, E1, F1, G1 Record 2: A2, B2, .......................G2 Thanks for any help! Dan A simple way is to 1) select all of the data fields. 2) Cli...

Show related records for custom entity
I have a custom entity. When I go to History I can not see the related records from contacts, opportunities, etc. They are not rolling up and there is no pick list to show related records or not. Is there a way to change this? Thanks, -Rick M On Fri, 23 Feb 2007 10:33:49 -0800, Rick M <> wrote: >I have a custom entity. When I go to History I can not see the related >records from contacts, opportunities, etc. They are not rolling up and there >is no pick list to show related records or not. Is there a way to change >this? > As...

Can MSCRM 4 handle millions of records (Product)?
Hi, We are in the middle of evaluating MSCRM 4 for a hypermarket. The objective is to load all the warehouse inventory into the Product entity, which are having approximately 6~7 millions of products (including sellable parts and etc.). This information will be available to the VIP card holders (Contact), as well as building royalty progammes and campaign management. Some selected Products will be available for ordering via a Portal (custom build), and the information will be updated to MSCRM as well. So, we need to know that whether MSCRM is a feasible solution for this kind of requi...

ListView insert
I have a ListView that I am using to edit and insert rows into a database table. I am displaying records for a specific person and existing records edit and update fine. Also, if a person already has records in that table, the ListView DropDownList population and insert works fine. The problem is that when a person has no records in the table (ListView is empty) the DropDownLists are not getting populated. I assume maybe because the DDL populating is being done in the ItemDataBound event? If so, where is the best place to populate the dropdowns for insert? Below is some of ...

Not recorded unless tab opened
I created a form with four tabs and (registration, progress,delivery of baby, and after delivery care. When i creat a new patient record in registration by putting name some details in the registration tab, if i close it at that point, the record cannot be recovered back into the form. However its in the table when i look for it. The surprising issue is if i open the delivery of baby tab and i only put in one single information, then i can recover that information on the form . The patient record will only be recovered if i fill the delivery of baby tab and no other tab allows th...

Adding a Record
I have 2 Subforms on my Main form. Each Subform contains a combo box with drop-down list. Their tables are on the many side of the one-to-many relationship with the Main form. When I make a selection on Subform 1, Subform 2 automatically populates with a correlated item from its drop-down list. PROBLEM: when I make a SECOND selection on Subform 1, the item that was listed on Subform 2 gets replaced with the item correlating with the SECOND selection. How can I adjust my code so that the second item is ADDED to the list on Subform 2 instead of replacing the first item? A sample of...

Creating a warning prior to deleting a record
I'm creating a membership database for an organisation. A problem I've encountered is the young lady that will be using the completed database is occasionally using control/z to undo an input error too frequently and deletes the record that she is inputting. As the membership number is an auto-number field this loses that particular membership number which I need to stop from happening. Is there anyway I can generate a warning prior to that final deletion to stop this from occurring? TIA BigAl Autonumber is not recommended for the use you describe, for exactly the reason you...

Deleting a row when adding a new row -
I have a spreadsheet that contains 100 rows. I want to limit the number of rows to 100. I.e. if the user adds a row (i.e. row 101) then all data from row 1 is deleted. I do not have to worry about the deleted data as it is updated in the new row! Can anybody help. I think you're saying you want the first row to be automatically deleted when a row is added at the end of the table. The row will have to be deleted, it won't happen automatically. The macro language is there for such specific requirements. -- Regards from Virginia Beach, Earl Kiosterud -------------...

Adding a menu
Hello, How do I add a new menu (not a sub-menu) to the menu bar using a macro in Excel 97? Thank you. Eric. Try this "Eric" <> wrote in message news:uGVq7is3DHA.1760@TK2MSFTNGP10.phx.gbl... > Hello, > > How do I add a new menu (not a sub-menu) to the menu bar using a macro in > Excel 97? > > Thank you. > > Eric. > > Thank you. Eric. "Township of East Hanover" <> wrote in message &...

"One or more of the selected senders could not be added to your blocked senders list"
Hey all. I get this when ever I try to killfile anyone at all, regardless of who they are. I'm on OE6 in XP Home and this has only just started happening. My KF only has a few spammers in it so I don't think it's full. Does anyone know what's going on? Thanks Ayatollah of rock 'n' roller wrote: > Hey all. I get this when ever I try to killfile anyone at all, regardless of > who they are. I'm on OE6 in XP Home and this has only just started > happening. My KF only has a few spammers in it so I don't think it's full. > Does anyone...