473,386 Members | 1,764 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,386 software developers and data experts.

Inserting records and re-sorting

116 100+
I have created a subform that you enter details of a job to be run on a machine. By entering a date and time it calculates the expected finish time using the amount the machine can produce in an hour and the quantity required. This works well.

However I have been told that sometimes the user may wish to slot something in the day which would mean once they had typed the details in, they then have to manually adjust all the start times accordingly for the day which is tiresome.

I was wondering if there was a button I could put on which would look through the records and resort all the start times.

To add to the problem if it goes over midnight then the start date would need to alter too.

I have attached an excel spreadsheet to explain what I mean and also the database I am working with.

Best regards

Christine
Attached Files
File Type: zip problem.db1.zip (174.5 KB, 102 views)
Jul 8 '10 #1
5 1200
nico5038
3,080 Expert 2GB
Hi Christine,

I see you're running into the known "deductable data" problem.
In a normalized database we would only record the StartTime (or Endtime) and the ElapseTime (or the needed quantity when that's defining the needed time).

In your initial design the StartTime and the needed Quantity are all needed to calculate the Endtime. You would extract the Qty/Hour of the selected machine (I guess different machines can have different Qty/Hour production). Now a division of the required Qty by the machine production per hour will give the job duration.
Adding this duration to the StartTime will give the Endtime.

On the other hand the user might want to specify the Endtime and you can calculate the Starttime using the Endtime -/- the calculated duration.

Getting the idea ?

Nic;o)
Jul 8 '10 #2
jacc14
116 100+
Hi Nic. Thanks for the response and I see what you are getting at and it works as you have detailed. However the user would need to put in the start time which would automatically do the calculations. I am trying to find a way of the start times changing if I was to slot another job in.
Thanks for taking the time to respond
Kind regards
Christine.
Jul 8 '10 #3
nico5038
3,080 Expert 2GB
Guess you want to plan the jobs with the machines.

Still using the starttime and (calculated) duration will work, however you'll need an additional check for the availability of the machine.

This might be daunting, as you'll need to take the "up-time" of the machine, time to switch from one production job to another and availability of the operators. All this can be used to assign a job into a free time slot. So a kind of reservation system.

When you "drop" the startime in first instance, but have the jobs prioritized so there's a way to establish a know sequence, then you can assign the starttime based on the machines availability. This will however need some "heavy" VBA coding, especially when the described extra's (switch time, operator availability, etc.) are being taken in account.

Getting the idea ?

Nic;o)
Jul 8 '10 #4
jacc14
116 100+
@nico5038
Thank you Nic. Food for thought there. Looks like i will be getting the vba book out again but you have definitely given me something to think about.

best regards
Christine
Jul 8 '10 #5
nico5038
3,080 Expert 2GB
Designing a database isn't easy. You'll always have to take all user requirements in account and ask them a lot of questions. In general I use the datamodel to check or all needed processes can be supported and when all their processes (tasks) are clear I start programming.

Glad you saw the need for thinking out the design as that's exactly what the intention with of previous post was. Don't hesitate to post more requirements and or design questions, as the best designs I've made were always based on discussions with my colleague designers. No one can foresee all situations and that's the big benefit from sites like this.

Success and keep me posted :-)

Nic;o)
Jul 8 '10 #6

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

Similar topics

2
by: P of Dhump | last post by:
Hello, I'm new to asp.net and ado.net so please reply considering that in mind. I'm trying to insert some records which are in a .CSV file but the insert is working double time. i have 744 records...
15
by: Jaraba | last post by:
I am working in a project that I need to parse an arrayt an select records based upon the values parsed. I used the functions developed by Knut Stolze in his article 'Parsing Strings'. I am...
1
by: gouse | last post by:
Hello Friends, In a Table I am inserting more than 50,000 Records one by one. It was taking a lot of time . Is it There any good approach/solution for inserting records more than 50,000 one by one...
5
by: kannaworld | last post by:
Hai all I wrote a common piece of code for inserting the records in a table using c#, i stored the control names in a Database table with the type of control, and the table field name will be...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
2
by: hakkatil | last post by:
Hi to all, I have a page that inserts excel sheet to access database. I am using asp. What I want to do is to check the inserting record if it is in the database. Basicly checking the dublicate...
2
by: masajid686 | last post by:
hi frnds I written the code for inserting records in sqlserver 2005 using dataset and command builder but i dont know hot write sp for that one. can anybody tellme Thanks
7
by: Lebbsy | last post by:
I have a 5-tabbed form that is used to add records in five different tables. The tables are excel-linked. When I press the save button the records goes to different tables but the fields are not...
5
by: rando1000 | last post by:
Okay, here's my situation. I need to loop through a file, inserting records based on a number field (in order) and if the character in a certain field = "##", I need to insert a blank record. ...
8
by: rando1000 | last post by:
I have a VBA program that loops through a table of table names and imports the records from those tables into another table. In some instances (not every time), the inserting gets confused, and I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.