473,549 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Access 2010, insert multiple records based on specific days in date range

3 New Member
I have an Access 2010 database that our staff use to keep track of appointments and activities. Some events occur weekly, and I would like the staff to be able to create those entries by selecting the day of the week and the start and end dates of the event. I am relatively new to VBA coding. I have found some examples that appear to replicate the entry daily across a series of dates, but I do not know how to tell Access to put in the entry for, say, every Wednesday, between those dates.

The staff are entering the information in a form bound to the main table. xtxBeginningDat e and txtEndingDate are the fields for the dates. cmbWeekday allows users to select the day of the week. The table is tblEventsRecord s and the form is fmEventsRecords . I have a CalendarDates table.
Jul 20 '19 #1
6 1820
NeoPa
32,564 Recognized Expert Moderator MVP
This will require code as this is a job you're requesting.

If you want help with it then please come back when you've started and are struggling with a particular aspect. We're not here simply to do your jobs for you.
Jul 20 '19 #2
Demeter
3 New Member
I have started. This database has been actively in use by the staff for over a year without issues. I have done extensive searches on how to do this, as I said in my original post, and have come across code that works on situations like mine, but it will insert a record for every day in that date range, not just for one particular weekday in that date range. A record for every day is not appropriate in this situation.

In my attempt to do this myself I have created a CalendarDates table, a query that will return all the weekdays in the date range, and and query that will duplicate the current record for every day selected by the weekday query, which gives me the exact records that I want. However, they can't be appended, updated, or saved to the original table because they don't generate the required automunber.

I am not asking anyone to do my job for me, I am asking for help with one specific part of it. If you don't want to help, that's fine, please just move on. I am not here to be scolded.
Jul 21 '19 #3
NeoPa
32,564 Recognized Expert Moderator MVP
I've had to remove what you posted and grandly selected as the Best Answer.

Before we set a Best Answer we first need a clear and qualifying question. I suggest if that's too much to ask, then you move on elsewhere. Otherwise you'll be expected to follow the rules and guidelines for the site. If you fail to manage that then you will certainly have this explained to you. We don't make special allowances for the precious. As I say, if that's not something you can handle then I'm sure all parties would be happier if you just move along elsewhere.
Aug 23 '19 #4
Demeter
3 New Member
I'm nobody's "precious". Never be been, never will be. I'm sorry I gave you or anyone else the impression I might be.

My expectations for this post were low. At best, somebody might be able to point me in the right direction and I'd get something that worked. At worst, I'd be ignored,which leaves me no worse off than I was.

What I did not expect was for NeoPa to visit my post - why would he? He might be the very best teacher on here, and I'm absolutely nobody.

Yet he did, and he essentially sent me home for not knowing how to do what I was asking help on learning how to do. I've never seen that happen, in all the posts I've read here. I'm not saying it hasn't happened before, just that this is the first time I've ever seen it happen. So I'm a bit shocked, and what I know is it's on me to find the answer to this, and I'm not going to find the answer in coding.

I'm sorry my solution can't be posted, but since it can't be then please close this thread, or take it down, or whatever you need to do. I'm so far past this now that anyone who might dare to help me later isn't really going to be helping, and I don't want to waste anyone's time here.

I'll be back, because I have to, because I have so much to learn, but I won't be posting anymore. This post went sideways almost the minute I posted it. I'll stick to Google from here on out.
Aug 25 '19 #5
NeoPa
32,564 Recognized Expert Moderator MVP
I was not saying you were my precious. Far from it. I was saying your behaviour was precious. There's a big difference. All expectation / no responsibility.

Like a few others you come along expending very little effort and expect others to do all the heavy lifting, and woe betide anyone having the temerity to try to put you straight. I don't mind a bit of heavy lifting if the one I'm working with is along for the ride, but you made it clear very early on that expecting the basics from you seems unreasonable to you. That's fine. Just don't expect anyone to put themselves out for you with such an attitude.

Even now it's all about you and unfair, etc, blah di blah. Not one word have I seen from you in all this thread that indicates you've given a moment's thought to the possibility that you may have to do something differently to conform to the site rules. It really is impossible to work with those that already know everything. It's just surprising that so many of them still seem to need to ask for help so often.
Aug 26 '19 #6
twinnyfo
3,653 Recognized Expert Moderator Specialist
And..... (I am not usually wont to pile onto other's threads, but...)

There is also another good reason NeoPa deleted the "Best Answer"--because it had nothing to do with solving your problem. If that solution was able to assign a list of appointment dates on Wednesdays, then great, but I can't see how it could have.

Just a free hint here, but Access has a nifty function called Weekday(), which returns a numerical value for the day of the week, based upon the date that is sent to the function. I am sure that this might be a place to start.

If you would like to make future posts, my guidance is this: 1) Explain your problem (that is, what you are trying to do); 2) show us what you have tried so far; 3) explain how what you have tried so far does not work (don't just say, "It doesn't work--please hepp!"--which is a common and frustrating occurence on this site), that is, explain to us that it is throwing an error (and tell us the exact error and what line is causing the error) or tell us that your results are different than expected; 4) Post any relevant code and describe any relevant table structures if necessary.

If you do that, we are more than happy to hepp! NeoPa and I have been doing this for a day or two and we both truly want to hepp users understand how to make Access work for them. But, please understand that I have been doing this for 25 years and NeoPa probably wired the first integrated circuit..... We expect that there will be folks out there who are new to Access and don't understand everything. But, we have gained the experience we have by working hard at learning our craft, asking questions of others and learning from our challenges and mistakes. There is no shortcut to expertise in any discipline. So, when we ask for some effort on a post that does not demonstrate any effort (even though you may have tried a thousand things--we saw no evidence of that), you may expect us to presume that you have not put any effort into your project. This presumption is not always correct, but we must evaluate based upon what we see, not upon what you know.

I do hope you are able to post new questions, and that this site serves as a valuable resource for you. It has hepped many--including myself.

Warmest regards,
Twinnyfo
Aug 26 '19 #7

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

Similar topics

0
1535
by: Ian Macey | last post by:
I am wanting to Insert multiple records into a table, and although I have some working code I feel that there must be a better way. The purpose of the code is to do a directory listing of a sub-directory and for each file listed insert a record into a temporary table. Can anyone help? My code is as follows.... SQL Stored Procedure...
1
1853
by: edhead | last post by:
Access newbie here, I am trying to figure out how to set up a query that will return an average from multiple records all created on the same date. Table has the following fields date, weight1, weight2. There are 30-40 records per day and I would like to be able to have the query find like dates (without having to enter a date) and give me an...
4
4971
by: Joanie | last post by:
I have a form that records dates of unavailability for a worker. Based on what is entered in the simple table behind the form, many calculations take place to create employee "load" balance. Each day needs to be inserted as a separate row on the table. Right now the users enter each date as a separate row. They want to just be able to enter a...
1
5033
by: visitram | last post by:
I am a newbie to Ruby and wondering how to insert multiple records at the same time. I want to create a form such that it accept multiple records and save it to DB upon submitting the form instead of one record at a time.
5
2495
by: jrodcody | last post by:
Hello: I am trying to create multiple records in a table named tblTravel based on the input of a date range in two form controls. The inputs for the form are LastName, TravelDate, EndDate, Event, LocationCity, and LocationState. Everything works perfectly, except for the fact that the dates do not correctly enter into the table. For...
3
4447
by: uma9 | last post by:
hi, the code below is used to insert a single record....i want to know how to insert multiple records using a "for" loop...please help Set connect = CreateObject ("ADODB.Connection") connect.open "DSN=OPTUMETL;Driver= Oracle in OraHome92;Server=urnts1.uhc.com;UID=OPTUMETL;PWD=OPTUMETL" Reporter.ReportEvent 0, "Database connection",...
3
5008
by: Vinda | last post by:
Hi Bytes, Using a previous question as a base Access 2000 Inserting multiple rows based on a date range. I also wanted to insert multiple rows into a table according to a date range supplied by a user (eg txtRDateStart & txtRDateEnd). The script was envisaged to be able to also gather a time and text description that would be repeated within...
8
6054
by: cehlinger | last post by:
I am trying to add multiple records based on a date range. I found some examples and have tried them but am getting errors and I can't seem to figure out what the problem is. I am not a VBA programmer so am a little lost. Any help would be appreciated. As an example, the user would enter in the following: 4 522 6/5/2010 6/10/2010 ...
1
4169
by: kffacs | last post by:
Multiple rows based on a date range I have an MSAccess 2007 DB to record our employees Personal Days Off (PDO). Until now I have only had a form to record each single day taken. This results in time consuming repetitive entry when an employee takes multiple consecutive days or weeks off. My database consists of two tables: tbl_PDO (to...
0
7527
marktang
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...
0
7459
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...
0
7967
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6052
agi2029
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...
1
5377
isladogs
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...
0
5097
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3505
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...
0
3488
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
772
bsmnconsultancy
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...

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.