Hi PHV,
Thank you for your quick response.
I can't remember the reason why I put Me.Requery in the code, but I had one :)
Removing it solves the problem.
Thanks!
Marcell
Dear all,
I've created a complaint form database where people can enter complaints. If the complaint is resolved, it can be closed by a specific person.
When you click the 'close complaint' button, the system is supposed to check whether two specific fields are filled in. If not, a message...
Hi there,
I designed a planning system which works great. However there are always things to improve.
It looks like this:
qryPlanning
PlanningID LocationID EmployeeID Start End
1419 36 81 15-2-2009 13:00:00 15-2-2009 18:00:00
1420 36 88 15-2-2009 13:00:00 15-2-2009 18:00:00
1421 36 1...
Hi JBinQLD,
It works! For further reference and to help other people I will include the codes below. Again thank you for your help JBinQLD.
With kind regards,
Marcell
The commandbutton on the form:
Private Sub cmdCopy_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryCopyLastWeek"...
Hi JBinQLD,
Thank you for your quick reply! I prefer the learning-way also because with copy&pasting I'll never learn to master Access.
I'm going to try to put the things you wrote into practise now and let you know when I succeed or when I run into any trouble.
With kind regards,
Marcell
Hi there,
Currently I'm designing a planning system in MS Access for a security company. It is going well but I got stuck at one issue.
Background
I have a table tblPlanning with the following fields:
PlanningID, LocationID, EmployeeID, Startdate, Enddate, Starttime, Endtime. I have a...
Hi TheAceMan1,
Finally I have something that works. I removed "tblPlanning_1.WerknemerID, " & _ from the SELECT statement, and I changed the Cri statement to [COLOR=red]Cri = "[PlanningID]=" & varPlanningID[/red] (since it is a numeric field).
The code now looks like this:
Private Sub...
Hi,
Thank you very much for your reply.
Yes, the query returns all duplicates. In my previous post (which I was typing at the moment you sent your reply) you can see that in case of one clashing event, it appears two times in the query. So when there are two clashes, it appears four times in...
Hi TheAceMan1,
I thought about the matter and looked at the query that I already had. When a 'clashing' event occurs it appears in the existing query as follows:
tblPlanning.PlanningID tblPlanning.WerknemerID tblPlanning_1.PlanningID tblPlanning_1.WerknemerID
158 7 159 7
159 7 158 7...
One thing I forgot. Eventually it would be nice to see in advance who is available during a specific time. For example that when you enter the start and end time of a new event, people who are still free appear in green while people who are occupied appear in red.
I think this is still far away...
Hi TheAceMan1,
Thank you for your quick reply. I'm not sure if I understand everything correctly but this is my idea:
I think that I have to execute the above code in the BeforeInsert part of the form. Is that correct?
In the Load part of the form I have to declare the variables:
Dim...
Hi there,
I'm designing a planning system in Access. Last week I (with help from you) created a query that looks for double entries (http://www.tek-tips.com/viewthread.cfm?qid=1479557&page=1).
Now I would like to create something that when a user adds a new event, the above query is executed...
Hi Golem,
Thank you for your quick reply. These fields are indeed real DateTime fields. I just tried the following code and it seems to work!
SELECT tblPlanning.PlanningID, tblPlanning.WerknemerID, tblPlanning.Bweergavedatum, tblPlanning.Edatum, tblPlanning.Btijd, tblPlanning.Etijd...
Hi there,
I'm designing a planning system in MS Access and currently I'm working on a query to identify events that overlap. Until now I have the following, which checks for the same employee (WerknemerID) assigned to multiple events at the same time.
SELECT tblPlanning.PlanningID...
Hi Golom,
Thank you very much! First it didn't work but then I removed the referential integrity between tblPlanning and tblRealisatie (don't ask why I enabled that in the first place ;) ) and now it's working fine.
I hope someday I will understand VBA the way you do.
With kind regards,
Marcell
Thank you for your replies JoeatWork and Golom.
JoeatWork: removing DoEvents doesn't change anything.
Golom, with the code you provided no errors come up but it just doesn't work as it should.
The sqlrealiseren part only works when I disable the sqldelete part (by putting ' before each...
Okay well I tried the following code, but yet it isn't working as it should. Both tables are exactly the same.
Problem 1: When I click the button there are records removed from tblPlanning, but nothing is added to tblRealisatie. When I disable the sqldelete part, records are added to...
Hi there,
Thank you both for your replies. The first solution I cannot get to work. I'm now trying the second solution, will let you know in a few mins.
I must commit that I'm a newbie with regard to access, sql and vba so I'm having quite a hard time:)
With kind regards,
Marcell
Hi there,
I'm developing a database (planning system) and I'm facing the following problem.
When I click on a button on the form, I would like to add all records from tblPlanning with Confirm = true to tblRealisatie and subsequently remove those records from tblPlanning. So in fact I would...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.