I'm using a query to calculate a field that I have defined as a percent format in the query. However, in the table the format remains blank and I have to go in and set it to a percent. Is there any way to force the format of the field in the table to a percent when running the query to create...
Here's the code I'm trying to execute:
If rsin.Fields![land_acqrowact] > 0 Then rsout.Fields![acqrowvarpct] = -1
ElseIf (rsin.Fields![land_acqrowbud]) > 0 And (rsout.Fields![land_acqrowact] = 0) Then
rsout.Fields![acqrowvarpct] = 1
ElseIf (rsin.Fields![land_acqrowbud] >...
I want to set up a VBA statement checking multiple conditions to be true, but can't get the syntax right.
If <expression> and <expression> is true then <execute statements>
else if <expression> and <expression> is true then <execute statements> else
<execute statements if the above don't...
I recently converted from Access 2000 to Access 2003. I have a database that uses the VB action OutputTo:
DoCmd.OutputTo acOutputReport, "rpt_statusdetail", acFormatRTF, "I:/Land/Capital Projects/Variance - 2005 Closed Projects/2005 Closed Detail Variance Report.rtf", False
This code no...
Does anyone know how to set up a DeleteObject command using a wildcard? Example - I want to delete all the tables in a database that have "copy" in the table name. Thanks!
I have an Access application that creates a table and uses TransferSpreadsheet to send it to Excel. Included are several Yes/No fields, which convert to "TRUE" and "FALSE" in Excel. The user updates the Excel spreadsheet and clicks on a button in the Access application to transfer it back to...
I have an Access application that transfers a table to Excel (transfer spreadsheet function). Users then update the Excel spreadsheet. The user can then click a button to re-convert the spreadsheet back into Access. My question is - when a yes/no field is transferred from Access to Excel, the...
Correction - I'm not setting up the key, I had code inseted to display a warning message, giving the user a change to change his/her mind. The delete code is what the wizard set up:
Private Sub CmdDelLO_Click()
On Error GoTo Err_CmdDelLO_Click
Dim ans1
ans1 = InputBox("CAUTION! This will...
My join type is a "1". The other curious thing is that the word "#deleted" appears in all the fields on the forms when this happens. The only code I inserted was to set up the key fields to ensure the correct record is deleted.
I have a database that has primary table 1, related to table 2, which is related to table 3, and 3 other tables related to table number 3. Table one has a one to many relationship to table 2, table 2 has a one to many relationship to table 3, and table 3 has a one to many relationship to its...
Yes Option Explicit is turned on, as it is in the other modules.
When I try to declare "Set db as DAO.Database", I get a "User Defined Type not defined".
When I turn off Option Explicit I get "Invalid Argument" on the "Set rs =....." statement.
When I leave Option Explicit turned on, I get...
Occasionly I try to open a recordset in a module, and I get a "variable not defined" message on the "dbopendynaset". My open statement is Set rs = CurrentDb.OpenRecordset ("tablename", dbOpenDynaset). Its as if Access doesn't recognize the statement. The table name is spelled correctly. I...
I have two tables - parent and child - trying to add a new record to the child table. I create a parent record using addnew and update but when I try to add child record I get the message that it can't be added because there isn't a related parent record. When I look at the parent table the...
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.