I am totally confused on the procedure to set top margin on a report.
In page setup I have chosen default printer, since the report could be printed on different printers. My code is shown below (I have omitted irrelevant code):
DoCmd.OpenReport strReport, acViewPreview, , , acHidden
With...
I am printing a report, and first open it in Printpreview,hidden and then specify the printer, and then open in Normal view to actually print the report. This works ok, but while this is going on, I would like the screen to display the form that initiated the printing. At the moment, the screen...
Thanks billmeye. This code looks great. It will do exactly what I want. You are right, the systems will not allow duplicate values, but if the user tries to change a entrynumber, then I want to display the message
Thanks Andy, I am not familiar with SQL, but would the rest of code need to set up a recordset and test for zero records. Would it be faster to use:
SELECT fld1 FROM YourTable
WHERE fld1 = valkueFromFormfld1
AND fld2 = valFromFormFld2
I have a table with a primary Index consisting of 2 fields, the index does not allow duplicates. The user can input data via a form, into both fields,fld1 and fld2. what is the fastest way to check if the combined fields input will cause a duplicate in the primary index ?
The EntryNumber is the Primary Key and when i close the form after entering a duplicate value, it does not save the new record, but exits without an error message, and the normal form events (beforeupdate etc) do not occur. I want to catch the error and popup a message box displaying the error...
I have a form based on a table,with a primary index, which is the "EntryNumber" field for that form. If I enter a duplicate of an existing "EntryNumber"( ie the Index), and then close the form using the DoCmd.close statement, I expect to get an error message, but do not. At other parts of the...
I am doing the adjustments in the SQL and it is working, but I cant edit the field in the datasheet. I now use the double-click to display a form and edit that way. Thanks for help, I will accept that this i as good as I can get
I dont know if there are events that relate to the populating of the Datasheet. So that as each row is populated,(in a similar way to forms)there might exist an event that would allow the modifications to a field value. ie for a textbox on the datasheet form:
Sub OnEvent ?
txtbox = " etc....."...
I am using Datasheet view and the datasheet seems to display all rows and columns before events occur. It is in this initial display that I would like to have some control
I have followed Dhookom's suggestion and it now works ok,
Does anyone know how records are displayed in a datasheet...Do they have associated events ?? as the noraml "on current" event for the subform does not seem to refer to a row in a datasheet
Thanks Duane and MajP. The reasons for the coding may seem strange, but there is a field in the recordset named "City" , which is hidden in the datasheet view, and it can contain a city name or be null. If it is null then I need to display it with a default city, eg "houston" and this is...
I have a recordset that I display in a datasheet. One of the controls is calculated(eg "result") based on another field of the recordset(ec "City"), and when I view this calculated field in the datasheet, I may want to edit it by changing the value of the first field(ie "City") on the...
I have 2 computers, both running access 2010 and loaded from the same distribution DVD. On one compter I can build and execute a database and correctly produce output file an MDE. If I then copy the db to the other and make an MDE file it works ok on that computer, but If I copy the MDE file to...
I have a recordset with one of the fields, "nbr" containing numbers that increase in value, but are not contiguous. I want to select records based on this field, and specifying the starting value and the next 10 records. If for example I wanted to get records starting with nbr=14, the where...
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.