Help with access please.

sherwood

New Member
Hey,

I am making a database for a canning plant at john smiths for my ICT project and if it works out right they will actually use it. But I seem to be stuck with it as I am familiar with Access as the only database stuff I have done is with phpmyadmin. So I was hoping for some help.

So first off I will explain what it will do to give you an idea on what it needs to do. The whole idea of the database is to improve performance and so on. What it will have on is The date for when a problem or a way of improving is identified (action) and then next to the date it will need to say what week it is (1 - 55) as they working in weeks there.

Now is there away I can get date to be inserted into the log automatically on today's date and also the same to happen with the week number?

I may ask more questions as I go on if that is alright but can make a new thread for different problems if wanted.

Thanks.
 
i am trying to understand what u said but all i came up was this :

9rqhdt.jpg


so u can select the date and week
2gv8yup.jpg


when the "whatsoever" happened.
If you want date and week to be generated automatically i think you need VB, am no good in it though.
Correct me where am wrong, i want to help you but i don't understant sh*t :P
 
well bassically I wanted the date to appear automatically on the right date which I have now done. I did that by changing the data type to date/Time and in default value I add 'Date()' Now for the week bit

As you know there is 55 weeks in the year right? Well I want a week column like this.
untitled.jpg

This is the what I have actually done so far.
erf.jpg


Now I want the week number to be placed automaticaly depending on the date. For example if it was the 8/01/08 the week numbe should show '2' in the week column. I just have a very basic understanding of access at the moment and I wanted to know is there a way for automaticaly add the week number depending on the date.
 
under default value use "=now()" and it will insert the current date/time

to work out the difference between 2 dates in weeks, days, months, whatever look into using the datediff function in VBA
 
under default value use "=now()" and it will insert the current date/time

Does 'Date()' not work just the same or is it different?

And I will have a lookinto using the datediff function in VBA but I don't no where to start. Any more advise is welcome!

Edit: The =now() will insert the date and time automatically but I onle want the date so i have used =Date() instead.

But still stook on the datediff funcution asI have no idea what to do with it.
 
Last edited:
Hmm. Well I have seemed to have got it working without useing the datediff function.

What I did was have the data type to date/time and then in the format box I put ww which will show the week number of the date. So I then Date() to the default value box which gives you todays date. So now it will convert that date into the week number.

Now another probelm :/.
I have 2 fields one called area of plant and team. and what I want it to do is when you have selected the area of plant from the drop down box it will automatically select the team that deals with that area. I hope that make sense.
 
yeah i did that in a school database so it only showed students for the selected class. wait and ill find the file.
 
what i did was i made a query

Code:
SELECT Student.UPN, Student.StudentSurname, Student.StudentForename, Student.StudentClass
FROM Student
WHERE (((Student.StudentClass)=[Forms]![Attendance]![ClassID]));

That query selects only the students for the class selected in the combo box

Then i went into properties for the class combo box and changed the VBA OnChange event to read

Code:
Private Sub ClassID_Change()
Me.UPN.Requery  'requery for the combox box to show only student for that class
End Sub

Finally, i set the data source for the student combo box to that query.

and it worked well, would only show students for that class
 
Erm. I don't think that is what i was wanting to do.

If you see the image below it maybe eaiser to explain.

dsds.jpg


You see the area of plant box? Well when a person comes to select the area of plant a drop down box comes down with the different areas. Now when someone has selected a area of plant I want the box called 'area' (the one that you can see with the dropdown box) to automatically select the right area as each area of the plant has one colour that looks after that part if you get what I mean.
 
Back
Top