i have created a new utility DB that has only one form..when it opens I set the startup form "Main" and on the OnOpen event of this form I have some code to open another database and close this one...
this means that whenever i open this database, it opens, opens up the other one and this utility DB closes...and i cannot access it coz it always opens and closes automatically...how can I stop it from executing to be able to edit its VB code?!
Not too long ago, I wrote a top ten ways to make sure your question was never answered. I'm going to append it.1) "Help Plz!!!!!!!!!!!!!!!" does not an answer give.2) http://www.access-programmers.co.uk/forums/showthread.php?t=850423) "I'm totally new to VBA" is not an excuse when you're asking for VBA. Someone providing you with the code teaches you nothing. Show code, show where you're stuck, show something. 4) Stop telling us how new you are and do not do suck up ("You guys are so great, and I've learned so much blah blah blah"). We know why we answer. If someone helped you before, reference that, and that's it. 5) The subject is just that. The freakin' subject. Remember that. "I'm stuck" is a bad subject. "Help with error resolution" is better.6) We do this for free. Remember that.7) Cross-posting -- not such a good idea.8) Never, ever ask that posts are sent to email addresses. Are you that lazy?9) Explain, in detail, what the issue is. The posts that are like, "I have this table where I query it, and it doesn't work!" followed by the query have no clear purpose. Make sure you know what you are asking for.10) For god's sake, try to figure it out on your own. None of the stellar answer people (myself, boblarson, docman, rural guy, and the others I'm forgetting) got this way off of message boards alone. Yes, questions were asked (most likely before this place existed), but for the most part, programming is a self-tutorial through trial and error.
This should be a simple one.... But can't seem to find the answer.... I have put a line of code on the open event of a seconadry form.... First form is "Clients" second form is "Contracts" If no the client has no contracts the code goes.....
Private Sub Form_Open(Cancel As Integer) If IsNull(DateOfSale) Or DateOfSale = " " Then MsgBox "No Contract Exist" Cancel = True End If End Sub
After the first message box I get a "Access" message box... "The OpenForm action was canceled" ....... Thats fine.... we know that... But we don't need to know that. How can I stop the second message box from opening? Or can I ?
On our database, we have a form that has 2 calendars. A start date and an End Date. The users fill in the name, and a couple other fields. Then select the start date, and end dates.
When they hit submit, the form enters into the table this info for each date in-between the start and end dates. For example if the users enters they will be taking vacation, then they enter 8/1 as a start and 8/10 as a end date. It will make an entry for each day. This works pretty well for us.
But I would like to improve it if possible.
Let say, a user a month ago made an entry that they would be work 8/23 at home. So in the database it has 8/23 at home.
Well, this week they decide they are going to take a vacation 8/21-8/25. So they make the new entry with start date 8/21 and end date 8/25. The form enters all the info just fine.
But if someone runs a report they see 8/23 at home, and also 8/21, 8/22, 8/23 ect on vacation. So gets a little confusing to where they actually are
So I was wondering if there is a way, for the database to prompt the person making the entry, that there is already an entry for 8/23 and ask if they want to delete it or save it? Then continue on creating the entries for the rest (8/24 and 8/25 in this example?).
Has anyone seen something like this? I was going to search, but not really sure what to search for on the forum.
Hi all. Can't seem to find a similar thread although I'm sure there must be one.
I have a macro that runs update queries when exiting the database. What I'd like to do is display a message whilst the updates are running. However, I only seem to halt the macro until the user clicks the ok button on the message box.
I am fairly new to this and have set up tables to include specific details. I need to type in a name works number etc on a person already entered. So how do I once details have been entered stop having to put them in again. I have created a form for data entry
I have two table. Deliveries Created (DC) and Goods Receipt (GR).
I have a query which links the two by PO number, PO Item, Unit code and Delivery quantity.
This works fine until one PO Number has more than one delivery quantity which is equal. For example.... The PO quantity is 4,000 but, because the units can only be shipped in quantities of 1000, there are four different entries in both the DC and the GR tables each with the same PO number, PO Item number, Unit code and delivery quantity (and shipped on the same date). This of course gives 16 results for the query using this PO number.
There is one unique field in the DC table this is the posting number field. I've tried grouping by this number and taking the First values from the GR table. This works OK in that it produces Four results but, two of the deliveries were received on Day 1 and two were received on Day 2. If I take First of GR date I get DAY 1 for all, If I take Max I get Day2 for all. What I need is the correct date.
Hi I've been having this same problem for a while and I've had a bit of help here but none of the suggestions have so far worked.
Basically I need a way to stop people tabing through a sub form without entering data. The sub form has a check box that has to be checked (it can't be set as True as default) the required field doesn't work and for some reason the Enforce Referential Integrity on the join between the main table (tblCustInfo) and this one doesn't work either.
tblCustInfo = the main form tblAgentData = subform
I'm writing a course registration Db. I have a have 3 tables at the moment tblContacts [ContactID], [FName], [SName], [Etc..] tblCourseRegistration[RegID] [ContactID][CourseID] and tblCourses[CourseID] [CourseName] [Etc...]
These are all linked on a tabbed form. I have found that the same Contact can sign up for the same course twice. I need to stop this happening. Is there an easy way to prevent this or do I have to write a query that runs before the save command to prevent this?
i wonder if anyone can help with this problem i cant seem to work out.
i have a bound form linked to an orders table, including some required fields. when i use the navigation buttons of the form to scroll thorugh the orders i can get to the end where the form expects you to make a new order. but i have a button to add a new order.
i want to stop the user being able to go past the last record in the orders table. or enable them to get back to the last order. currently if the user goes past the last record (making a new order) there is no way to get back to the last record. using the navigation back button causes errors as the required fields are blank and access tries to save the order, thinking i want to make a new one.
i hope this makes sense.
i have tried setting the Allow Additions setting of the Form to No. but this causes problems when there is no data in the orders table. opening the form produces a blank form, showing no fields or buttons at all.
i would be greatful for any advice, maybe i am doing something fundamentally wrong?:confused:
i wonder if anyone can help with this problem i cant seem to work out.
i have a bound form linked to an orders table, including some required fields. when i use the navigation buttons of the form to scroll thorugh the orders i can get to the end where the form expects you to make a new order. but i have a button to add a new order.
i want to stop the user being able to go past the last record in the orders table. or enable them to get back to the last order. currently if the user goes past the last record (making a new order) there is no way to get back to the last record. using the navigation back button causes errors as the required fields are blank and access tries to save the order, thinking i want to make a new one.
i hope this makes sense.
i have tried setting the Allow Additions setting of the Form to No. but this causes problems when there is no data in the orders table. opening the form produces a blank form, showing no fields or buttons at all.
i would be greatful for any advice, maybe i am doing something fundamentally wrong?:confused:
I will explain this situation using a scenario. Let's assumed that i'm working on a library system where i need a loan form that will only show books that are available for loan. In this case, this form has a main form that shows library member's details and its subform shows the details of the books that are loan by library member. In this subform, one of the fields (ISBN no) displays its values using a combo box. Once a value is selected from this combo box, values in other fields found in the subform will be shown too. These values are based on a table that contain books info, where only the value (ISBN no) in the combo box comes from a query. This query will only show books that are available for loan.
If a library member wants to borrow 'booktitle1' then this book will not be available to be loan by other members and assumed that there is only one 'booktitle1'.
I tried to update the field manually by changing the status field every time the book is loan out. I hope to solve this problem in an effective way.
I am new with access and i have difficulty to explain it in a much better way. Sorry, if my description cause any sort of confusion.
These are the tables.
book_info (table1) ------------------------------- bookTitle ---------- text ISBN(pkey) ------- text authorName ------ text category ---------- text dateReceived ---- date publisher ---------- text status -------------- text
user_info (table2) -------------------------------- name --------------- text userID(pKey) ------ text address ------------ text tel ------------------ number hp ------------------ number occupation -------- text DOB --------------- date
loan_info (table3) ------------------------------ userID(fKey) ------ text ISBN(fkey) -------- text dateReturned ---- date dateBorrowed ---- date dateDue ---------- date remarks ----------- text
I have created a form based on a query that prompts the user to enter a persons name. Once entered, the persons data appears on the form and some other related data appears in a subform. However, I have found a problem that occurs when a name is entered that doesnt exist on the database... the form opens completely blank!! even text and graphics disappear!
I have a form with a combo box on it, used to select staff members.
When I select a staff member it displays a list of tasks assigned to this staff member in a sub-form.
This is all working as I want - however, when another user (on another computer) selects a different staff member from the combo box, after a short time, that second staff member is displayed on my screen and consequently the second users tasks are aslo displayed.
How can I stop this combo box updating every time someone else selects a value?
I have an user imput form that has a unique file reference number which is typed in by the user in the first bound field. Does anyone know of a way of informing the user that the file reference number is already in use and therefore a new one must be used. At the moment the user is completing the entire form before being made aware that it would create duplicate records and therefore unable to save current record etc...Totally fustrating! any ideas? Steve
I tried this but dont know how to stop the timer...I want to run the code that changes the Form color but want to be able to stop the Timer and reset it to start over..Will this timer work? Almost like an auction timer. But want to be able to reset the code at any stage...
Code: Public Sub ExcelTimer() Dim PauseTime, Start, Finish
I have a query that retrieves a list of all "Open" issues/projects that I'm working on. I've added a couple of columns in the query to calculate the age of each project (comparing Now() to Start Date), and using a comparison between the last time I updated the project to Now().
The problem I'm having is that the second calculation is based on the first calculation. As a result, the second calculation causes prompt box "Enter Value Parameter" to pop open whenever I open the form based on this query.
I would like to know how can I open this form without the prompt box popping up?
I have a ACCESS application that I wrote several years ago and use quite a bit. Sometimes, I will open it up and it does not work properly. I have a form that contains several subforms and one of the subforms has cells that contain formulas like this one
=[fExpense_entries].[Form]![total_form_expenses]
Normally, I see numbers in these cells. But sometimes, these cells are just blank. Sometimes, I can get the db to work again if I open and close it a few times. Other times, that doesn't work and I have to "save as" a new file name. Today even that didn't get normal operation back but I did a full system reboot and then it worked again.
I also sometimes get a message that my file has been opened as read only, and sometimes I get a message that macros are not enabled.
There does not seem to be any pattern to when it stops working or what it takes to fix it.
Hi We have recently upgraded our computers and therefore reinstalled Office on the new machines. The opreating system is Win XP + patch 2. The version of MS Access is 2002
For all our databases I have chosen to hide the database window, so other user don't accedentally change tables and queries etc. Now the problem is, with the new computers, whenever I minize the database and then open it, the database weindow pops up right on top of every thing else automatically.
I have no idea why this happens and how to stop it. Could any one please shed some light. Your help would be apprecialted.
Hi, Am not sure if its possible with access but have a hunch that it might not be something very difficult.
I have developed an access FE/BE application (in the network). The front-end users run query and view the results fine.
They copy (ctrl-C) the data from the query datasheet and paste (ctrl-V) it to Ms-Excel which I want to stop. Is there any way that I can stop/restrict them from copying the data and pasting it somewhere else. I want to stop this operation.