I have the following code which for some reason ended up dropping the source table, any ideas why that happened?
Sub ImportBookingsTable()
Dim db As DAO.Database
Dim sourceDB As String
Dim sourceTable As String
Dim destinationTable As String
' Set the source database and...
I have what should be a simple query:
SELECT
qry_receipt_bay_progress_2.[Cases Expected],
qry_receipt_bay_progress_2.[Cases Receipted],
qry_receipt_bay_progress_2.[Packs Expected],
IIf(
[VP] = 0,
0,
-Int(-([Cases Receipted] / ([VP] * [SP])))
) AS...
Same issue, but then again ..I have no idea what I'm doing :)
SELECT qry_tbl_crt_bookings_by_container.Container,
(SELECT Count(*) FROM (SELECT DISTINCT PO FROM qry_tbl_crt_bookings_by_container AS SubQ1 WHERE SubQ1.Container = qry_tbl_crt_bookings_by_container.Container)) AS CountOfPO...
I have 2 queries `qry_tbl_crt_bookings_by_container` which prompts the user for a container number and a second query which I want to count some values from the first query:
SELECT qry_tbl_crt_bookings_by_container.Container,
(SELECT Count(*) FROM (SELECT DISTINCT PO FROM...
Dates are a constant issue, for example, if I want to save a date in a table and I want it to have the format dd/mm/yyyy, I have to insert it as mm/dd/yyyy or it will be the other way around. No idea what is going on.
Not directly, I'm using data from a Date Field inside the table but not the actual field. The value for the particular Date I'm using inside the form is set by vba code.
If it's not too much trouble, could you post a screenshot or some instructions on how to add a Date Field to a form? All I can find is "Text Box".
Also, even with the formula above I'm getting the same results.
Thanks.
I have no idea why this is failing, I simply want to make the background red if the Date is before Today. The results I am getting are all over the place.
Could you provide a snippet on how I would avoid this `detour`?
Assuming my query would be:
strSQL = "SELECT EAN, CrtStock, Adjustment, AdjDate " & _
"FROM tbl_adj_logs " & _
"WHERE AdjDate < #" & Format(deleteDate, "yyyy/mm/dd") & "#;"
How would I send it to excel file...
Thanks, small typo there I think, but made it work with:
excelWorksheet.Cells(lastRow, "A").CopyFromRecordset rs
Out of curiosity is there a way I can do it without opening the excel sheet? Or are there other methods, just trying to wrap my head around access and vba.
Also previous to the...
I'm trying something quite basic I assume but it's not working. I want to append the contents of an access table to an excel file or create the excel file if it does not exist. So far I either get errors or the excel file is overwritten instead of the data being appended.
This is my full code...