Microsoft Access Question

I have a date field on my form and i want to use this to look up a list of booking dates.

I have created a command button and used the operations wizard to look up values on a bookings form.

when i enter a date with day (01-09) e.g. 05/08/05 it doesn’t look up any records although these exist in the database. It works ok with other dates with days 10-31 e.g. 11/08/05

Any suggestions on why this is happening?

Re: Microsoft Access Question

Maybe it doesn't like the date starting with a 0

Re: Microsoft Access Question

If you don’t mind me asking, what kind of database are you creating and if you are using vb script to look up that field, did you specity in the vb prog how you want it to look for the date. e.g. should it be short, long, medium, or general date. would you mind posting your vb program or proly providing me with your form. I might be able to help you out. But, I don’t suppose it is one of a huge issue or concern, is it?

tofi you are funny :stuck_out_tongue:

Re: Microsoft Access Question

Oyeee, there’s the “wolf girl” :hehe:

Re: Microsoft Access Question

you can attach a macro to the button to make it execute a query on your database. In Access, the date is presented in the following way: #05/04/04#. If you want to find particular records after a certain date, then in the criteria you would use something like >#01/01/01# ... meaning all records where the date is past 1st Jan, 2001.

I hope is what you were looking for :s

Re: Microsoft Access Question

I am lost babay jee :stuck_out_tongue: stop laughing :hoonh:

nos and why would you use macro there. what is macro gonna do. I don’t think he needs macro to run his query on the form. Till he doesn’t tell us what he’d like to achieve by doing that, I don’t think any of us can help him. I am sure he can do this in an easier way through query and vb combination, unless he has something else on his mind.

Re: Microsoft Access Question

"… easier way through query and VB combination … " :hehe: … sure … that’s an easier way …

The macro I’m talking about is simple, it will only issue a ‘run’ command for the query, nothing hi-funda. Btw; you should be open to suggestions and new ideas girl … just because you’ve done it in VB doesn’t mean its the ‘best’ and easiest way :stuck_out_tongue: … Personally I don’t like VB that’s why I suggested using a macro .. nice n’ simple :halo:

Re: Microsoft Access Question

^ and if you ask this guy(nos) to do the macro thing, I bet he won’t be able to do so :hoonh:

Re: Microsoft Access Question

okay relax and calm down, take a deep breath. Now, I am just saying if he needs help we all are here. But, macro has to run on some command rite, you need to write something down for that too. And btw why are we discussing this, when this guy is not even responding back to us. :hoonh:

And please don’t get carried away :p, sometimes we don’t know what other person is capable of, since you are pro in securities and stuff, I am sure there is something that he is strong at too.

Let me tell you something, if you would have had asked me anything about vb 3 months ago, I would have had said ‘come again’ or ‘pardon me’, but now I try to write my own codes, thanks to Allah I am getting good at it. Its all about practice ;). I am sure if you keep reading codes, you would be able to do the same, and proly you will learn it faster than me:)

Re: Microsoft Access Question

its called peer review :smooth:

Re: Microsoft Access Question

rotfl, if you are really interested in peer review, then ans my query. How can you update certain field after 30 days, I know I can use macro to execute it automatically, but how would you do this by query. :slight_smile:

can it be done in this manner

UPDATE combo1 SET combo1.Processes = “Active”
WHERE (((combo1.Processes)=“New”) AND ((combo1.DateRecieved)<(30+[DateRecieved])));

but there is something missing here and I can’t figure out what that is :frowning:

temme now :slight_smile: I hope we can have a good discussion on this :wink:

Re: Microsoft Access Question

*ot tairay key … phas gaya na

hey you took me seriously … :hehe: … I was just BS’ing … :stuck_out_tongue:

Okay, I might be able to help you out but first I have to finish a couple of assignments that are due on the 18th :smack:

P.S: I would need more info on your question .. just throwing the query at me doesn’t explain the question :hoonh:

P.S2: Did you open a thread for this particular problem of yours PD? reference please

Re: Microsoft Access Question

does it matter :p, its always the tongue which can lead you to ur grave or make you the king of jungle :p. You said we were just discussing rite. Yes, I did post this topic I think a long time ago, but then I left this question for the last moment, cuz there were other stuff which was suppose to be done on urgent level. I need this today, and you are trying to break the knot by saying you have assignments due on 18th :hoonh: baray ae, dikha rahay thay ke bohat aalim hain :stuck_out_tongue:

okay, I will let you go, go finish up all your assignments, but don’t forget we are not done yet :devil:

Re: Microsoft Access Question

^ grrrrr ....

Re: Microsoft Access Question

kya hai, kaam nahie hai kya, go and be done with you assignments :hoonh:

Re: Microsoft Access Question

My God, Itni Saari Replies! Thanks Guys! sorry for the late response...kaam mein masroof tha

Right here is the situation:

I am creating my Database in access.

  • I have a form where i enter in a date and click on a command button to bring up another form which lists bookings under that date.

  • I created a command button with the wizard and chose open form then chose find a record that matches the date field.

  • The form did as planned until i noticed it didn't seem to pick up records with dates starting with a 0 e.g. 01/05/05

Tofi Obviously yaar!

Nos i kinda like your idea, i'll try running a query and set the criteria to >#01/01/01# ...to see if that works...i'll let you know!

Pagal deewani yaar come up with some VB script to help me!

Re: Microsoft Access Question

omg look at you, make use of friggin parameters in query and you are all set. you don’t even need form or vb script, its just about query.

Okay lets just say, you have start date and a end date

you use start date and then assign criteria, and do the samething with the end date. when you will click on it, it will give you two pop ups asking for start date and the end date you want to look for. The best thing to do is look over the northwind database which comes with the ms access. dl that if you don’t have it. its on ms site. If you don’t understand this format ask me and I will go with you step by step. Hopefully this will work out for you just fine.

oh yeah, apology accepted :smiley:

Re: Microsoft Access Question

if you'd like to find all records within Jan, for example, then your criteria would like something like this:

between #01/01/01# and #31/01/01#

And btw; when ever you are playing with the date you have to use the hash with it, cause that's how Access identifies the date.

:biggthumb

Re: Microsoft Access Question

Hey I was good with my -0- remark :hula:

Anywho, why don’t the dudes do some testing with some variations when you are writing code, do some google, do some playing around? I am not a coder but whenever i see a question here I do a light google and i ususually find an answer.

This is nothing against you CM, I’m just concerned with the laziness of our paki ppl in how they can’t seem want to do any work. We are here to help, absolutely! But if u just come up with a question without trying to replace a (') with a (") then i don’t know what’s going to happen to them.

In short :bailan:

Re: Microsoft Access Question

bailan se bohat dard hota hai, yeh apnee wifey ke saath khela kerien hoonh, and whatever that expression was, I didn’t get it :stuck_out_tongue:

An excellent speech, and how much do you follow up on this urself :p; just kidding man. :stuck_out_tongue: You are right, I would agree with you, I myself is one of them or I should say was. Anyways, Yes DM try out everyway possible you could think of and if you still don’t get it, come and ask us, we’ll be here to help you out.

Nos, tru you do need that, but I am sure he is not looking for only jan date. In that case you really don’t need to define the date at all. You just have to use the parameters to define what is null and watz not in what criteria. The way I am thinking its possible in that sense. I would proly be able to show you an example of it, if you want to see it.