473,395 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Adding Multiple Records to SubForm

I want to add several records to the subform. This works until line 4 (error 2105; can't go to specified record. Can't I keep adding records like this?

Expand|Select|Wrap|Line Numbers
  1. Me.frmMissingItems_Subform.SetFocus
  2.  
  3. DoCmd.GoToRecord , , acNewRec
  4. Forms!frmPCSTracker!frmMissingItems_Subform!MissingID = "1"
  5.  
  6. DoCmd.GoToRecord , , acNewRec
  7. Forms!frmPCSTracker!frmMissingItems_Subform!MissingID = "2"
  8.  
  9. DoCmd.GoToRecord , , acNewRec
  10. Forms!frmPCSTracker!frmMissingItems_Subform!MissingID = "3"
Mar 1 '16 #1
1 1795
twinnyfo
3,653 Expert Mod 2GB
If I read your code correctly, you are adding a record to the main form, not the subform.

I would ask why you want or need to add records to a subform programmatically. This might help us understand what you are trying to do and offer, perhaps, some alternate solutions.
Mar 10 '16 #2

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

Similar topics

10
by: shank | last post by:
I have a recordset that contains multiple records of product a user is purchasing. For clarity, I converted the recordset fields to variables. I need to take that entire recordset and insert it...
1
by: mellie | last post by:
Hi there, SQL 2000 database with ASP I've found many things "out there" regarding updating and deleting multiple records with checkboxes but I can't seem to find anything about adding them. ...
6
by: Wendy Powley | last post by:
I have a subform which represents a 1:N relationship with the main form. I would like to be able to read values from an external file, fill the subform with the values read & allow the user to...
1
by: Alec Christie | last post by:
Hi All, I currently have 3 tables, Clients, Events and Event Status as follows: Clients: ClientID, Name, Address Events: EventID, Name, Date Event Status: StatusID, EventID, ClientID,...
1
by: groups | last post by:
Ok, this may turn out to be longwinded, so pelase bare with me... I am working on an inventory/stock control database for the IT systems in the school I work at. I currently have two tables that...
5
by: Kaur | last post by:
Hi, I have been successful copying a vba code from one of your posts on how to copy and paste a record by declaring the desired fields that needs to be copied in form's declaration and creating two...
3
by: sgtsaltandpepper | last post by:
Hi, i am making a database to track the training courses that employees have to attend for my brothers company. There is one main table involved in what i am trying to do it is called...
1
Stephen74
by: Stephen74 | last post by:
I am trying to add multiple records to a single table using a SQL without using a loop in VBA. Is this possible? sample table tblNames FName | LName | Company...
0
by: tomric | last post by:
I have a table set up that is used for viscosity data on a our parts. There are are eight different checks over three different materials that go into construction of our parts. There can also be...
6
by: James Burton | last post by:
I would like to add records with preset data, if it is possible. my tables with data as an example: Name:Perodin, Sid: 05515, date:110425, effDate:110416, SO#:444-11, LikeOff:5, Reason:5th...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
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...

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.