Ask Your Question

cmpd's profile - activity

2017-01-07 14:59:41 +0200 received badge  Famous Question (source)
2016-07-16 04:03:04 +0200 received badge  Famous Question (source)
2016-06-09 15:20:03 +0200 received badge  Notable Question (source)
2016-06-08 13:44:54 +0200 received badge  Popular Question (source)
2016-06-08 11:25:36 +0200 commented answer listbox reseting/valuelist

Yes, this way it works. But not if you want to show a different content, e.g. A= Example 1 B= Example 2

Users cannot work with just numbers (1,2,3). They need an explanation what (1,2,3) is. Thanks.

2016-06-07 13:09:50 +0200 answered a question listbox reseting/valuelist

Seems to be a bug. Sometimes it works, sometimes it does not. No idea.

2016-06-07 12:55:09 +0200 received badge  Editor (source)
2016-06-07 12:48:35 +0200 asked a question listbox reseting/valuelist

Hello, my valuelist works a few times and then it stops working. First, it does not show any data in the database, when I do select something it writes always the first value into the database. Any idea?

Edit: no base writes always 0 into the database.

OS: Linux Mint 17.2, LibreOffice 5.x

2016-03-15 14:38:11 +0200 received badge  Notable Question (source)
2016-03-15 09:28:09 +0200 commented answer filter by date via macro

This is not exactly what I am looking for. The date value should come from the date field. See my own answer above. But thanks anyway!

2016-03-15 09:26:17 +0200 answered a question filter by date via macro

I tried the following (with acces2base):

Sub FilterbyDate
Dim dDate As Date, ofForm as object, sfilter as string
dDate = Forms("MAIN").Controls("FilterDate").Value
ddate = format(v,"yyyy-mm-dd")
ofForm = Forms("Main")

sfilter = "FastTel.Reminder >=" + "{d'" & dDate & "'}"
ofForm.Filter = sfilter
ofForm.Filteron = True
End Sub

But I get: SQL-Status: 42000

Syntax error for DATE escape sequence '00:00:00'

2016-03-15 08:12:47 +0200 received badge  Enthusiast
2016-03-14 15:44:09 +0200 received badge  Popular Question (source)
2016-03-14 09:22:25 +0200 asked a question filter by date via macro

0 down vote favorite

I am trying to re-use the following search macro to also filter by date.

Sub SearchByDSS 
dim oFilter as object
dim oFormCtl as object 
oFormCtl = ThisComponent.Drawpage.Forms.getByName("Main")
oFilter = oFormCtl.getByName("Control")

if oFilter.CurrentValue <> "" then
oFormCtl.Filter = "table.Field LIKE" + > "'"+oFilter.CurrentValue+"'"
oFormCtl.ApplyFilter = True
else
oFormCtl.ApplyFilter = False
end if 
oFormCtl.Reload 
End Sub

I changed the code to something like:

oFormCtl.Filter = "table.Field >=" + {D '" & oFilter.Text & "'}"

but still no luck. Any ideas? Thanks in advance!

2016-02-26 11:15:17 +0200 commented answer access2base: Get value and use it in sql

Thanks to both of you. It worked like a charm!

2016-02-24 15:01:45 +0200 commented answer access2base: Get value and use it in sql

Thank you very much!

2016-02-21 16:44:53 +0200 received badge  Famous Question (source)
2016-02-18 15:02:15 +0200 commented answer access2base: Get value and use it in sql

How? The basic variable is not regonized as correct syntax

Sub Value Wert = Forms("Festungen").Controls("IDTESTUNGEN").Value DoCmd.RunSQL("Insert Into tantworten(IDGRUPPE,IDFRAGE,IDTESTUNG) Select Wert as IDTESTUNG, tfragen.IDGRUPPE, tfragen.IDFRAGE from tfragen") END Sub

2016-02-18 15:01:49 +0200 answered a question access2base: Get value and use it in sql

How? The basic variable is not regonized as correct syntax

Sub Value Wert = Forms("Festungen").Controls("IDTESTUNGEN").Value DoCmd.RunSQL("Insert Into tantworten(IDGRUPPE,IDFRAGE,IDTESTUNG) Select Wert as IDTESTUNG, tfragen.IDGRUPPE, tfragen.IDFRAGE from tfragen") END Sub

2016-02-17 09:03:56 +0200 received badge  Notable Question (source)
2016-02-16 19:27:32 +0200 received badge  Popular Question (source)
2016-02-16 14:40:01 +0200 asked a question access2base: Get value and use it in sql

Hello,

i am currently trying to write a macro with access2base that reads the current value of a textfield "IDTEST" and then executes an INSERT INTO SELECT STATEMENT using the current value of this field. I can querry the field by

Forms("Main").Controls("IDTEST").Value

but how can I use this value in an SQL statement?

Thanks in advance!