ms-access

Single prompt parameter for shared parameter in sub-reports' queries

主宰稳场 提交于 2019-12-25 07:18:56
问题 I have put two sub-reports in a main report. The main report comes out fine, but the [Enter Year] parameter appears twice: once for each sub-report's query where it occurs. This is normal, and I can probably reduce it to one prompt by writing code. But I think there must be a way to give a named parameter once, and the sub-report queries will pick it up and use it. I would like a non-code method to do this, since next I will do a similar collected report for many sub-reports with shared

Task Scheduler will not run macro

这一生的挚爱 提交于 2019-12-25 07:14:19
问题 I am using access 2013 and have setup a macro to be called via the task scheduler. I am currently getting the the error 2001 when opened via the task scheduler. My database has been set as a trusted location but the macro will not complete. I am running under my login. All other macros work perfectly. If I manually open access to run the macro It runs just fine without any errors. I am updating two spreadsheets in this one macro so not sure if this has anything to do with it. Here is the

Input Mask without Year for date

陌路散爱 提交于 2019-12-25 07:11:51
问题 Could anyone help me in inserting a input mask formula for date in a access form textbox that shouldnot take year which only take date and month in the below format : DD/MM Not in DD/MM/YY Thanks for help in advance 回答1: 99/99 would work. 回答2: I'd suggest that you probably shouldn't use a date mask like this with data stored in a date field. If you input like "06/13" that will be stored as 06/13/2009 today and as 6/13/2010 a year from now. That is, all entry that doesn't specify a year will

MS access table as centralised location for storing data [closed]

喜欢而已 提交于 2019-12-25 07:05:52
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Is it possible to make my MS access tables as a centralised location for storing data I have an mdb access file to store data into a

Compressing multiple fields to a single column in MS-Access

不羁岁月 提交于 2019-12-25 06:59:02
问题 I am attempting to normalize a database that uses multiple columns for the same thing. For instance, Street, Street2, ..., Street12 . My current plan is to create a separate Street table, containing columns for Street and mainID , (plus a new ID field for this table,) where mainID is the primary key for the main database. (Example) Each mainID could be linked to multiple Street records as needed, allowing for the removal of the Street columns in the main table. I'm planning to reference this

subform combobox rowsource update - how update drop down list

折月煮酒 提交于 2019-12-25 06:53:32
问题 I have a treeview control on an MS Access form. A subform combo box control's list of values depends on the node selected in the treeview on the main form. I am trying to achieve refresh of the combo box drop down list contents on the subform as follows: Public Sub TreeView1_nodeClick(ByVal node As Object) subForm.Controls("Bid").RowSource = "... newquery depending on tree node values ..." subForm.Controls("Bid").Requery End Sub But oddly enough, this does not update the list of values. A

How can I check if an instance of a Access 2010 form is still open?

隐身守侯 提交于 2019-12-25 06:52:57
问题 Preface I have a need to create multiple copies of a search form (in Access 2010 ) that returns a value to the calling (which is also the form that created the instance of the form). As mentioned these forms could and will have multiple copies running at the same time for example a user could want to add a company to something so they: Click "select company" and open an instance of the company search screen Then open the company editor (leaving the original company search/selection screen

VBA Code to change font and size in an email from access

被刻印的时光 ゝ 提交于 2019-12-25 06:39:04
问题 I have an access form that runs a query. There is a command button on the form that I want to send an email with the query results attached in an excel spreadsheet. Using the code below I am able to attach the results and send the email ok. I would like to be able to format the email body so that it is more noticeable. I'm not really sure how to go about doing this and still have my query attached. I have also created an email template that I would use but I haven't been able to figure out

how to add foreign key to access table using adox

社会主义新天地 提交于 2019-12-25 06:34:55
问题 I am trying to creat a database with two tables. i want to add in a foreign key in one of them. but the following code is not working, i debug it and i found that the only problem is in adding the foreign key. private static bool creatDatabase() { bool result = false; Catalog cat = new Catalog(); Table tableCustomer = new Table(); Table tableAddresses = new Table(); //Create the table Customer and it's fields. tableCustomer.Name = "Customer"; tableCustomer.Columns.Append("Customer_ID", ADOX

How to format a numeric field in Microsoft Access?

与世无争的帅哥 提交于 2019-12-25 06:14:32
问题 I want a numeric field to be always displayed as a 3-digit number. Padded left with 0s as needed. Example: 3 is shown as 003, 24 as 024 and so on. Assuming max number is 999. How do I do so? Thanks. 回答1: Function Lpad (Value as String, PadCharacter as String, PaddedLength as Integer) Lpad = string(PaddedLength - Len(Value), PadCharacter) & Value End Function Ref. Lpad("3", "0", 3) 来源: https://stackoverflow.com/questions/15456871/how-to-format-a-numeric-field-in-microsoft-access